Exemplo n.º 1
0
 public static Practica2.CharacterModel.Faction Faction(this Practica2.CharacterModel ch)
 {
     return(ch.color == Color.red ?
            Practica2.CharacterModel.Faction.Enemy :
            (ch.color == Color.blue ?
             Practica2.CharacterModel.Faction.Ally :
             Practica2.CharacterModel.Faction.Neutral));
 }
Exemplo n.º 2
0
 public static Practica2.CharacterModel.Health State(this Practica2.CharacterModel ch)
 {
     return(ch.hp > ch.maxHP * 0.9 ?
            Practica2.CharacterModel.Health.OK :
            (ch.hp > ch.maxHP * 0.1 ?
             Practica2.CharacterModel.Health.Damaged :
             Practica2.CharacterModel.Health.NearDeath));
 }
Exemplo n.º 3
0
 public static bool IsCritic(this Practica2.CharacterModel ch)
 {
     return(ch.hp < ch.maxHP * 0.1 ? true : false);
 }
Exemplo n.º 4
0
 public static bool IsOk(this Practica2.CharacterModel ch)
 {
     return(ch.hp > ch.maxHP * 0.9 ? true : false);
 }