예제 #1
0
파일: Unit.cs 프로젝트: adamrezich/arena
 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;
 }
예제 #2
0
파일: Client.cs 프로젝트: adamrezich/arena
 public int GetPlayerID(UnitController player)
 {
     return Players.FirstOrDefault(x => x.Value == player).Key;
 }
예제 #3
0
파일: Unit.cs 프로젝트: adamrezich/arena
 public Attitude AttitudeTowards(UnitController unitController)
 {
     if (unitController.Team != Team)
         return Attitude.Enemy;
     return Attitude.Friend;
 }