Beispiel #1
0
        public void ReachNextLevel(int level)
        {
            // add +1 to the level
            ActorStatSettings.ActorStatModifer characterStatModifer = new ActorStatSettings.ActorStatModifer(level, ActorStatSettings.StatModType.Flat, 0, this);
            stats["LEVEL"].AddModifier(characterStatModifer);

            // reset XPs to 0
            stats["XP"].RemoveAllModifiersFromSource(this);
        }
Beispiel #2
0
        public void ChangeHP(int amount)
        {
            // add/remove to the HP
            ActorStatSettings.ActorStatModifer characterStatModifer = new ActorStatSettings.ActorStatModifer(amount, ActorStatSettings.StatModType.Flat, 0, this);
            stats["HP"].AddModifier(characterStatModifer);

            if (GetStat("HP") <= 0)
            {
                Die();
            }
        }
Beispiel #3
0
 public void GainXPs(int amount)
 {
     // add +1 to the level
     ActorStatSettings.ActorStatModifer characterStatModifer = new ActorStatSettings.ActorStatModifer(amount, ActorStatSettings.StatModType.Flat, 0, this);
     stats["XP"].AddModifier(characterStatModifer);
 }