Ignore:
Timestamp:
2013-07-25 14:58:28 (6 years ago)
Author:
dezhidki
Message:

Talletus.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Units/Mobs/Mob.cs

    r4646 r4671  
    2121        protected AStar pathFinder; 
    2222        protected int dirID; 
    23         protected AnimationHelper walkingAnimation; 
     23        protected TimerHelper walkingAnimation; 
    2424        protected float pushResistance; 
    2525        protected bool canBePushed; 
     
    3232            currentOrder = new Order(); 
    3333            pathFinder = new AStar(level, this); 
    34             walkingAnimation = new AnimationHelper(10, 2).Start(); 
     34            walkingAnimation = new TimerHelper(10, 2).Start(); 
    3535            immunityTime = 20; 
    3636            canBePushed = true; 
    3737            pushResistance = 0.0F; 
    3838        } 
     39 
     40        public bool HasActiveOrders { get { return currentOrder != null && !(currentOrder is OrderIdle) && !currentOrder.Finished; } } 
    3941 
    4042        public Level Level { get { return level; } } 
     
    7173        } 
    7274 
    73         public void OnGroupOrder(List<Mob> mobs, float x, float z) 
     75        public void OnGroupOrder<T>(List<T> mobs, float x, float z) where T : Mob 
    7476        { 
    7577            foreach (var mobGroup in mobs.GroupBy(m => m.TypeID)) 
    7678            { 
    77                 List<Mob> ms = mobGroup.ToList(); 
     79                List<T> ms = mobGroup.ToList(); 
    7880                ms[0].OnSameTypeGroupOrder(ms, x, z); 
    7981            } 
    8082        } 
    8183 
    82         protected virtual void OnSameTypeGroupOrder(List<Mob> mobs, float x, float z) 
     84        protected virtual void OnSameTypeGroupOrder<T>(List<T> mobs, float x, float z) where T : Mob 
    8385        { 
    8486            OnFunctionClick(x, z, mobs.Count, false); 
Note: See TracChangeset for help on using the changeset viewer.