Exemple #1
0
        protected override void OnExecute(Command com)
        {
            Agent.StopCast(this.ID);

            if (com.HasPosition || com.HasTarget)
            {
                if (com.HasPosition && CanMove)
                {
                    if (HasTarget)
                    {
                        cachedMove.RegisterGroup(false);
                    }
                    else
                    {
                        cachedMove.RegisterGroup();
                    }

                    isAttackMoving = true;
                    isFocused      = false;
                }
                else if (com.HasTarget)
                {
                    isFocused      = true;
                    isAttackMoving = false;
                    LSAgent tempTarget;
                    AgentController.TryGetAgent(com.Target, out tempTarget);
                    Engage(tempTarget);
                }
            }
        }