Add an Upgrade

1

Adding new Upgrade Type

Go to the Path:, open UpgradeType.cs class.

Add a new entry to the UpgradeType enum that will represent your new upgrade.

public enum UpgradeType
{
    Armor = 0,
    Health = 1,
    Healing = 2, 
    Damage = 3, 
    Revive = 4,
    // Enter your new upgrade type here
}

2

Creating Upgrade Asset

Go to the Path: . Right click to open a context menu and Select Create -> October -> Upgrades -> Upgrade

3

Filling asset fields

Select the upgrade you just created, and fill the following fields:

Field
Description

Upgrade Type

Select the type from step 1

Icon

Select the sprite that will be shown in upgrades menu

Title

The display name of the upgrade in upgrades menu

Dev Start Level

This upgrade level will be active at launch, use it for testing purposes. Default value is -1

Levels

The levels of the upgrade. Each has cost and value fields

4

Adding asset to the database

Go to the Path: and select the Upgrades Database asset. Add the new upgrade from the previous steps to the Upgrades List of the said asset.

5

Implementing upgrade

Now that the upgrade is created, you need to write the custom implementation of its behavior inside the game. Use the following method from anywhere in the project:

GameController.UpgradesManager.GetUpgadeValue(UpgradeType.Upgrade)
GameController.UpgradesManager.IsUpgradeAquired(UpgradeType.Upgrade)
GameController.UpgradesManager.GetUpgradeLevel(UpgradeType.Upgrade)
GameController.UpgradesManager.GetUpgradeData(UpgradeType.Upgrade)

Last updated