public static SSMoveToAction GetSSAction(Vector3 target, float speed) { SSMoveToAction action = ScriptableObject.CreateInstance <SSMoveToAction>(); action.target = target; action.speed = speed; return(action); }
public void moveRole(GameObject role, Vector3 middle_pos, Vector3 end_pos, float speed) { SSAction action1 = SSMoveToAction.GetSSAction(middle_pos, speed); SSAction action2 = SSMoveToAction.GetSSAction(end_pos, speed); moveRoleToLandorBoat = SequenceAction.GetSSAcition(1, 0, new List <SSAction> { action1, action2 }); this.RunAction(role, moveRoleToLandorBoat, this); }
public void moveBoat(GameObject boat, Vector3 target, float speed) { moveBoatToEndOrStart = SSMoveToAction.GetSSAction(target, speed); this.RunAction(boat, moveBoatToEndOrStart, this); }