entity changes, classes
This commit is contained in:
parent
bda2b88796
commit
8bd4aedcf9
20 changed files with 1917 additions and 27 deletions
|
|
@ -32,6 +32,13 @@ public class TurnHandler : MonoBehaviour
|
|||
[Header("Spawning")]
|
||||
[SerializeField] private int enemySpawnAmount;
|
||||
|
||||
[Header("Endless Mechanics")]
|
||||
[SerializeField] private bool isEndless = false;
|
||||
[SerializeField] private int baseSpawnAmount;
|
||||
[SerializeField] private int amountToSpawn;
|
||||
[SerializeField] private float exponentIncrease;
|
||||
private int currentWave = 1;
|
||||
|
||||
private void SortEnemies()
|
||||
{
|
||||
enemyEntities = enemyEntities.OrderBy(o=>o.turnSpeed).ToList();
|
||||
|
|
@ -83,12 +90,18 @@ public class TurnHandler : MonoBehaviour
|
|||
foreach (PlayerEntity player in playerEntities)
|
||||
{
|
||||
player.actions = player.maxActions;
|
||||
player.debugDoneObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void EnvironmentTurn()
|
||||
{
|
||||
EnemySpawner.instance.SpawnEnemy(enemySpawnAmount);
|
||||
if (isEndless && enemyEntities.Count == 0)
|
||||
{
|
||||
amountToSpawn = Mathf.FloorToInt(baseSpawnAmount * Mathf.Pow(currentWave, exponentIncrease));
|
||||
EnemySpawner.instance.SpawnEnemy(enemySpawnAmount);
|
||||
currentWave++;
|
||||
}
|
||||
}
|
||||
|
||||
public void SkipAll()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue