Exemplo n.º 1
0
    public void IncreaseAbility(int abilityID, float value)
    {
        Ability ab = abilityStructs[abilityID];

        ab.GiveValue(value, true);

        switch (abilityID)
        {
        case 0:
            player.moveSpeed += value;
            break;

        case 1:
            player.jumpSpeed += value;
            break;

        case 2:
            player.boostScale += value;
            break;

        default: break;
        }

        if (hud != null)
        {
            hud.AbilityLevel(ab.AbilityName, value);
        }
    }