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)); }
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)); }
public static bool IsCritic(this Practica2.CharacterModel ch) { return(ch.hp < ch.maxHP * 0.1 ? true : false); }
public static bool IsOk(this Practica2.CharacterModel ch) { return(ch.hp > ch.maxHP * 0.9 ? true : false); }