예제 #1
0
파일: Mob.cs 프로젝트: I3lue12/Projects
 public Mob(string name, Vector pos, Animation aniNone,
            Animation aniMove, Animation aniMelee, Animation aniRanged,
            MobType type, Vector goal, int hp,
            int atk, int def, double spd, double sight)
     : base(name, pos, aniNone)
 {
     Type         = type;
     Goal         = goal;
     Home         = goal;
     this.hp      = hp;
     Attack       = atk;
     Defense      = def;
     Speed        = spd;
     SightRange   = sight;
     Velocity     = new Vector(0, 0);
     this.aniMove = aniMove;
     if (aniMove != null)
     {
         aniMove.AddLocateable(this);
     }
     this.aniMelee = aniMelee;
     if (aniMelee != null)
     {
         aniMelee.AddLocateable(this);
     }
     this.aniRanged = aniRanged;
     if (aniRanged != null)
     {
         aniRanged.AddLocateable(this);
     }
 }
예제 #2
0
 public Locateable(string name, Vector pos, Animation aniNone)
 {
     Name         = name;
     Position     = pos;
     this.aniNone = aniNone;
     if (aniNone != null)
     {
         aniNone.AddLocateable(this);
     }
 }