public static SSPushAction GetSSAction(Vector3 target) { SSPushAction action = ScriptableObject.CreateInstance <SSPushAction>();//让unity自己创建一个MoveToAction实例,并自己回收 action.target = target; return(action); }
public void onShip(GameObject role, Vector3 end_pos) { moveRoleOnShip = SSPushAction.GetSSAction(end_pos); this.RunAction(role, moveRoleOnShip, this); }