Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="actionType"></param>
        public virtual void StopAction(GameActionTypeEnum actionType, params object[] args)
        {
            if (CurrentAction != null && CurrentAction.Type == actionType)
            {
                if (!CurrentAction.IsFinished)
                {
                    CurrentAction.Stop(args);
                }
                if (CurrentAction != null && CurrentAction.Type == actionType)
                {
                    CurrentAction = null;
                }
            }

            switch (actionType)
            {
            case GameActionTypeEnum.MAP:
                Map?.DestroyEntity(this);
                break;
            }
        }