public void RemoveAction(JActionState 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 ("JUnityAction: removeAction: Action not found");//Comment Mark,Don't Delete } } else { // Debug.LogWarning ("JUnityAction: removeAction: Target not found");//Comment Mark,Don't Delete } }
public static void StopAction(this GameObject target, JActionState actionState) { if (JActionManager.Instance != null) { JActionManager.Instance.RemoveAction(actionState); } }
public static void StopAction(JActionState state) { var instance = JActionManager.Instance.gameObject; instance.StopAction(state); }
public static void StopAction(this MonoBehaviour target, JActionState actionState) { target.gameObject.StopAction(actionState); }