Exemplo n.º 1
0
        //todo rename executiong to animating or such.
        public void AgentFinishedAnimatingMove(AgentBase agentBase)
        {
            if (_allSubMoves.ContainsKey(agentBase))
            {
                _allSubMoves[agentBase].Finish();
            }
            _isComplete = !IsExecuting();            //only update this when it changes.

            //When the last agent has completed their animation.
            if (_isComplete)
            {
                if (executedValidAndComplete)
                {
                    _puzzleManager.CallPreMoveComplete(this);
                    //execute afterMove
                    if (IsValid && _afterMove != null)
                    {
                        ExecuteAfterMove();
                    }
                    _puzzleManager.CallPostMoveComplete(this);
                }
            }
        }