🦇
Monster Survivors Template Documentation
  • Welcome
  • CHARACTER
    • Add a Character
    • Starting Ability
  • Stages
    • Stage Creator
    • Tracks And Clips
    • Stage Settings
    • Create a Stage
  • Enemies
    • Simple Enemies
    • Ranged Enemies
    • Bosses
    • Add a Simple Enemy
    • Add a Boss
  • Abilities
    • Ability Types
    • Abilities System Structure
    • Add Abilities
  • Upgrades
    • Upgrade Types
    • Upgrades System Structure
    • Add an Upgrade
  • Game structure
    • Main Menu Scene
    • Game Scene
  • Input
    • Input System
    • Menu Navigation
  • Known Issues
    • IOS Build
  • Testing
    • Abilities Testing Overlay
    • Presets
Powered by GitBook
On this page
  1. Upgrades

Upgrades System Structure

PreviousUpgrade TypesNextAdd an Upgrade

Last updated 4 months ago

Upgrades system structurally in a way is a simplified version of an abilities system. Whereas the abilities have custom AbilitiyData and AbiulityLevel classes for each abilities, each upgrade shares the UpgradeData and UpgradeLevel classes with other upgrades.

Each Upgrade Level contains only two parameters - cost and value. Unlike the abilities system, it's up for the rest of the game to implement the upgrades. For example, the PlayerBehavior will ask the Upgrades Manager for the value Health Upgrade and will add it to it's health.

public void RecalculateMaxHP(float maxHPMultiplier)
{
    var upgradeValue = GameController.UpgradesManager.GetUpgadeValue(UpgradeType.Health);
    healthbar.ChangeMaxHP((Data.BaseHP + upgradeValue) * maxHPMultiplier);
}

DevStartLevel field is a simple way to test upgrades without needing to spend time and in game money. -1 means that it is disabled, each number above corresponds to the level from re levels list.

Simplified diagram of Upgrades System
Health Upgrade asset