Battle scene

There are two towers. One belongs to a player and the other one - to his opponent. Both spawn troops, which fight each other.
  1. The first player’s tower health
  2. Opponent’s tower health
  3. Upgrade player’s tower energy info
  4. “Upgrade energy” button
  5. Player’s gold balance
  6. Character (spawned by the player)
  7. Minimap
  8. The player’s tower
  9. “Spawn player’s troops” button
Energy mechanics:
There’s an energy that a player uses to spawn troops (archers, spearmen, or hammermen). It grows continuously to the maximum value that can be increased by increasing the energy level (there has to be a config for this) by tapping the Upgrade energy button (4). The energy grows continuously; every frame of points that are added to the progress bar has to be configured. The maximum energy value increases by increasing the maximum energy level
Gold mechanics:
Every time the opponent’s troop dies, the player gains some amount of gold (there must be configs for different characters)
Minimap:
Displays the player’s and opponent’s troops on a small map
Tower:
The tower has a health level and can be damaged. Once the tower’s health level is lower than a certain point of health, the tower’s sprite changes.The tower has a health level and can be damaged. Once the tower’s health level is lower than a certain point of health, the tower’s sprite changes.
Tower settings:
Health - the number of points that represent the tower’s health
Max energy - the number of the max energy points
Energy cooldown - the amount of energy that is being filled up with every frame added to the energy value
Upgrade steps - steps of upgrade energy mechanics

User case: the user starts with a maximum energy of 200 points, and upgrades it with steps [0.25, 0.5, 0.75, 1.0]

Spawning Characters Mechanics:
- the user has to have enough energy - the cooldown must be equal to zerod The cooldown is the time since the last time this type of character was spawned.
Spawn Character Button:

Cooldown equals zero, and the user has enough energy;

Cooldown is more than zero and less than one; the user doesn’t have enough energy;

Cooldown equals zero, but the user doesn’t have enough energy.

Character settings:
Move forward speed -the speed of a character;
Distance to attack - the distance where a character starts to attack;
Damage -the amount of damage that the opponent’s character receives
Health - points of character’s health;
Cost -the price of spawning a character in energy points;
Cooldown -the time of waiting before spawning another character.