public static SpiderFollowAction GetSSAction(GameObject player) { SpiderFollowAction action = CreateInstance <SpiderFollowAction>(); action.player = player; return(action); }
public void SSActionEvent(SSAction source, int intParam = 0, GameObject objectParam = null) { if (intParam == 0) { SpiderFollowAction follow = SpiderFollowAction.GetSSAction(objectParam.gameObject.GetComponent <SpiderData>().player); this.RunAction(objectParam, follow, this); } else { GoSpiderAction move = GoSpiderAction.GetSSAction(objectParam.gameObject.GetComponent <SpiderData>().start_position); this.RunAction(objectParam, move, this); Singleton <GameEventManager> .Instance.PlayerEscape(); } }