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