public static PropFollowAction getAction(GameObject player) { PropFollowAction action = CreateInstance <PropFollowAction>(); action.player = player; return(action); }
public void SSActionEvent(SSAction source, int intParam = 0, GameObject objectParam = null) { //跟随动作 if (intParam == 0) { PropFollowAction follow = PropFollowAction.getAction(objectParam.gameObject.GetComponent <Prop>().player); this.addAction(objectParam, follow, this); } //玩家逃脱重新开始巡逻 else { PropMoveAction move = PropMoveAction.getAction(objectParam.gameObject.GetComponent <Prop>().start_position); this.addAction(objectParam, move, this); } }