Beispiel #1
0
 public PlayerStatBoost(PlayerBoostType type, CharacterStatus playerStats)
 {
     Type         = type;
     IsEnded      = false;
     _timer       = 0;
     _playerStats = playerStats;
 }
Beispiel #2
0
    public void AddStatBoost(PlayerBoostType type, int duration, float boost)
    {
        //first check if any boost already exists with same type
        //if so remove it
        List <PlayerStatBoost> copy = new List <PlayerStatBoost>(_statBoosts);

        foreach (PlayerStatBoost b in copy)
        {
            if (b.Type == type)
            {
                _statBoosts.Remove(b);
            }
        }

        PlayerStatBoost newBoost = new PlayerStatBoost(type, GameManager.Inst.PlayerControl.SelectedPC.MyStatus);

        _statBoosts.Add(newBoost);
        newBoost.StartBoost(duration, boost);
    }