private void ActivateAction(ActionBase action, string actionName)
        {
            //if (action != null)
            //{
            //    action.OnDeactivate();
            //    action.DisconnectInputs();
            //}

            action = ModifierContainer.Get(actionName);
            action.Setup();
            action.OnActivate();

            if (OnSwitchAction != null)
            {
                OnSwitchAction();
            }
        }
        public void SwitchAction(string actionName, string pendingActionName)
        {
            if (CurrentAction != null)
            {
                CurrentAction.OnDeactivate();
                CurrentAction.DisconnectInputs();
            }


            CurrentAction = ModifierContainer.Get(actionName);
            PendingAction = ModifierContainer.Get(pendingActionName);
            CurrentAction.Setup();
            CurrentAction.OnActivate();

            if (OnSwitchAction != null)
            {
                OnSwitchAction();
            }
        }
        public void SwitchAction(string actionName)
        {
            //if (PendingAction != null)
            //{
            //    PendingAction.OnDeactivate();
            //    PendingAction.DisconnectInputs();
            //}
            if (CurrentAction != null)
            {
                CurrentAction.OnDeactivate();
                CurrentAction.DisconnectInputs();
            }

            CurrentAction = ModifierContainer.Get(actionName);
            CurrentAction.Setup();
            CurrentAction.OnActivate();

            if (OnSwitchAction != null)
            {
                OnSwitchAction();
            }
            if (actionName == ModifierNames.None && PendingAction != null && PendingAction.Name != ModifierNames.None)
            {
                if (CurrentAction != null)
                {
                    CurrentAction.OnDeactivate();
                    CurrentAction.DisconnectInputs();
                }
                PendingAction.Setup();
                PendingAction.OnActivate();

                if (OnSwitchAction != null)
                {
                    OnSwitchAction();
                }
                PendingAction = ModifierContainer.Get(ModifierNames.None);
                //return;
            }
        }