Esempio n. 1
0
 public static void StopAction(this GameObject target, MTActionState actionState)
 {
     if (MTActionManager.Instance != null)
     {
         MTActionManager.Instance.RemoveAction(actionState);
     }
 }
Esempio n. 2
0
        public void RemoveAction(MTActionState actionState)
        {
            if (actionState == null || actionState.OriginalTarget == null)
            {
                return;
            }

            GameObject  target = actionState.OriginalTarget;
            HashElement element;

            if (targets.TryGetValue(target, out element))
            {
                int i = element.ActionStates.IndexOf(actionState);

                if (i != -1)
                {
                    RemoveActionAtIndex(i, element);
                }
                else
                {
//					Debug.LogWarning ("MTUnityAction: removeAction: Action not found");//Comment Mark,Don't Delete
                }
            }
            else
            {
//				Debug.LogWarning ("MTUnityAction: removeAction: Target not found");//Comment Mark,Don't Delete
            }
        }
Esempio n. 3
0
 public static void StopAction(this MonoBehaviour target, MTActionState actionState)
 {
     target.gameObject.StopAction(actionState);
 }
Esempio n. 4
0
 public static void StopAction(this MonoBehaviour target,MTActionState actionState)
 {
     target.gameObject.StopAction (actionState);
 }
Esempio n. 5
0
 public static void StopAction(this GameObject target, MTActionState actionState)
 {
     if(MTActionManager.instance != null)
         MTActionManager.instance.RemoveAction(actionState);
 }
Esempio n. 6
0
        public static void StopAction(MTActionState state)
        {
            var instance = MTActionManager.Instance.gameObject;

            instance.StopAction(state);
        }
Esempio n. 7
0
        public void RemoveAction(MTActionState actionState)
        {
            if (actionState == null || actionState.OriginalTarget == null)
            {
                return;
            }

            GameObject target = actionState.OriginalTarget;
            HashElement element;
            if (targets.TryGetValue(target, out element))
            {
                int i = element.ActionStates.IndexOf(actionState);

                if (i != -1)
                {
                    RemoveActionAtIndex(i, element);
                }
                else
                {
                   Debug.Log("MTUnityAction: removeAction: Action not found");
                }
            }
            else
            {
               Debug.Log("MTUnityAction: removeAction: Target not found");
            }
        }