package RTDB
using Tank

TankGameplay : ArcadeGameplay
{
	fk< TankGameplayData > gameplayData = "";
	CName backgroundTDBID = "";
	CName playerTDBID = "";
	CName enemySpawnerTDBID = "";
	CName obstacleSpawnerTDBID = "";
	CName pickupSpawnerTDBID = "";
}

TankGameplayData
{
	float scoreMultiplierDecayBlockedTime = 0.f;
	float scoreMultiplierDecayRate = 0.f;
	fk< TankScoreMultiplierBreakpoint >[] scoreMultiplierBreakpointList = [];
	Vector2 worldVelocity = ( 0.f, 0.f );
	fk< TankLevelGameplay >[] levelList = [];
}

TankLevelGameplay
{
	ResRef[] preLoadedResourceList = [];
	CName startSFX = "";
	float duration = 0.f;
}

TankBackgroundData
{
	fk< ArcadeBackgroundLayer >[] backgroundLayerList = [];
	CName decorationSpawnerTDBID = "";
}

TankWeapon : ArcadeObject
{
	CName projectileID = "";
	float rof = 0.0f;
	float chargingTime = 0.0f;
	int perBurstProjectileCount = 1;
	float perBurstProjectileSpawnInterval = 0.0f;
	Vector2[] rotation = 
	[
		( 0.f, 1.f )
	];
}

TankProjectileSpawnerData
{
	fk< TankProjectile >[] projectileList = [];
}

TankProjectile : ArcadeCollidableObject
{
	float velocity = 0.f;
	int damage = 0;
}

TankPlayerData
{
	int maxLives = 0;
	int maxHealth = 0;
	int maxAEAMS = 0;
	Vector2 velocity = ( 0.f, 0.f );
	int rammingDamage = 0;
	fk< TankPlayerWeaponLevel >[] weaponLevelList = [];
	float invincibilityTime = 0.f;
	float flatlinedScorePenalty = 0.f;
	CName projectileSpawnerTDBID = "";
}

TankPlayerWeaponLevel
{
	fk< TankWeapon >[] weaponList = [];
}

TankEnemySpawnerData
{
	float spawnTime = 0.f;
	fk< TankEnemy >[] enemyList = [];
	fk< TankLevelSpawnableArrangement >[] levelList = [];
	CName projectileSpawnerTDBID = "";
}

TankEnemy : TankDestroyableObject
{
	float velocity = 0.f;
	fk< TankWeapon > weapon = "";
	int rammingDamage = 0;
	bool isTracker = false;
	Vector2 headParentTranslation = ( 0.f, 0.f );
	ResRef headTextureAtlas = "";
	CName headTexturePart = "";
	Vector2 headAnchorPoint = ( 0.f, 0.f );
}

TankArrangement
{
	int[] arrangement = [];
	fk< ArcadeSpawnableID >[] spawnableObjectIDList = [];
	fk< ArcadeSpawnableID >[] spawnableReplacementObjectIDList = [];
	int[] spawnableReplacementObjectCount = [];
}

TankSpawnableArrangement
{
	fk< TankArrangement >[] objectArrangementList = [];
	int columnCount = 0;
	Vector2 slot = ( 0.f, 0.f );
	CName displacement = "";
	float probability = 1.0f;
}

TankLevelSpawnableArrangement
{
	fk< TankSpawnableArrangement >[] arrangementList = [];
}

TankObstacleSpawnerData
{
	float spawnTime = 0.f;
	fk< TankDestroyableObject >[] obstacleList = [];
	fk< TankLevelObjectID >[] levelList = [];
}

TankPickupSpawnerData
{
	fk< TankPickup >[] pickupList = [];
}

TankPickup : ArcadeCollidableObject
{
	int value = 0;
	CName pickupLocKey = "";
}

TankDecorationSpawnerData
{
	float spawnTime = 0.f;
	fk< TankLevelObject >[] levelList = [];
}

TankDestroyableObject : ArcadeCollidableObject
{
	int health = 0;
	float score = 0.f;
	float scoreMultiplier = 0.f;
	float dropProbability = 0.f;
	float rammingInvincibilityTime = 0.f;
}

TankLevelObject
{
	fk< ArcadeSpawnableObject >[] objectList = [];
}

TankLevelObjectID
{
	fk< ArcadeSpawnableID >[] objectList = [];
}

TankScoreMultiplierBreakpoint
{
	float percentage = 0.f;
	float value = 0.f;
}

