Upgrade scene

On the upgrade scene, the user can upgrade the characters and tower settings.
Character state:
  1. Gold amount;
  2. “Characters” inset;
  3. “Tower” inset. If the user taps it, a popup switches to the tower’s state;
  4. Character's buttons. Allow switching between different characters;
  5. “Upgrade” button and the price of the upgrade in gold;
  6. Character’s icon;
  7. Character’s info;
  8. “Close scene” button.
Upgrading Characters mechanics:
The user can use gold for improving the following troops’ characteristics: - health; - damage; - the energy that is used for spawning another character. Every character has to have its own upgrade config.
Upgrading characters settings:
Health, damage, energy cost, and price of an upgrade. Characters can’t be upgraded infinitely, so there has to be a max upgrade level.
Tower state:
  1. Gold amount
  2. “Character” inset. If the user taps on the inset, popup switches to the character’s state;
  3. “Tower” inset;
  4. Tower’s icon;
  5. ----
  6. The current level of gold upgrade;
  7. The current level of energy upgrade;
  8. Tower strength upgrade level, its means tower’s health;
  9. “Upgrade gold level” button with the price of upgrading in gold, button in the active state;
  10. “Upgrade energy level” button with a price of upgrading;
  11. “Close scene” button.
For being upgraded, the tower characteristics must have a config of upgrade with price, current upgrade level, and characteristics value on the level.
Reset popup:
  1. Open upgrade scene button
  2. Restart battle scene button
Next Level popup:
  1. Open upgrade scene button
  2. Open battle scene with upgraded opponent’s characteristics