public static ArrowShakeAction GetSSAction(GameObject gameObject, ISSActionCallback _callback) { ArrowShakeAction action = ScriptableObject.CreateInstance <ArrowShakeAction>(); action.gameobject = gameObject; action.startPos = gameObject.transform.position; action.callback = _callback; return(action); }
public void SSActionEvent(SSAction source, SSActionEventType events = SSActionEventType.Competeted, int intParam = 0, string strParam = null) { runSequence.Remove(source); if (events == SSActionEventType.Unfinish) { SSAction action = ArrowShakeAction.GetSSAction(source.gameobject, this); addAction(action); } else if (events == SSActionEventType.Reload) { this.callback.SSActionEvent(source); } }
public void shake(GameObject arrow) { SSAction action = ArrowShakeAction.GetSSAction(arrow, this); addAction(action); }