public void Add(Move mover)
 {
     if (mover.MyMovementGroup .IsNotNull())
     {
         mover.MyMovementGroup.movers.Remove(mover);
     }
     mover.MyMovementGroup = this;
     mover.MyMovementGroupID = indexID;
     movers.Add(mover);
     moversCount++;
 }
        protected override void OnSetup()
        {
            cachedBody = Agent.Body;
            cachedTurn = Agent.Turner;
            cachedMove = Agent.Mover;
            if (Sight < Range)
                _sight = Range;
            baseDeltaCount = InfluenceManager.GenerateDeltaCount(Sight);
            rangeDeltaCount = InfluenceManager.GenerateDeltaCount(Range);

            fastRange = (Range * Range);
            attackFrameCount = AttackRate;
            basePriority = cachedBody.Priority;

            CanMove = cachedMove .IsNotNull();
            if (CanMove)
            {
                cachedMove.OnArrive += HandleOnArrive;
                cachedMove.onGroupProcessed += _HandleMoveGroupProcessed;
            }

            CanTurn = cachedTurn .IsNotNull();
        }
 public void Remove(Move mover)
 {
     moversCount--;
 }
Exemple #4
0
 public void Remove(Move mover)
 {
     moversCount--;
 }