Exemplo 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;
 }
Exemplo n.º 2
0
 public int GetPlayerID(UnitController player)
 {
     return Players.FirstOrDefault(x => x.Value == player).Key;
 }
Exemplo n.º 3
0
 public Attitude AttitudeTowards(UnitController unitController)
 {
     if (unitController.Team != Team)
         return Attitude.Enemy;
     return Attitude.Friend;
 }