Esempio n. 1
0
 public Unit(UnitController owner, int maxHealth, int maxEnergy)
 {
     Owner = owner;
     MaxHealth = maxHealth;
     MaxEnergy = maxEnergy;
     Health = MaxHealth;
     Energy = MaxEnergy;
     Direction = 0;
     IntendedDirection = 0;
     AttackTarget = null;
     Level = 0;
     Experience = 0;
 }
Esempio n. 2
0
 public int GetPlayerID(UnitController player)
 {
     return Players.FirstOrDefault(x => x.Value == player).Key;
 }
Esempio n. 3
0
 public Attitude AttitudeTowards(UnitController unitController)
 {
     if (unitController.Team != Team)
         return Attitude.Enemy;
     return Attitude.Friend;
 }