From e881265ee6fa713a8223024194f49b15cfc069ae Mon Sep 17 00:00:00 2001 From: march3 Date: Tue, 14 Nov 2023 16:29:05 +0800 Subject: [PATCH] =?UTF-8?q?Python=E8=B6=85=E4=BA=BA-=E5=AE=87=E5=AE=99?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sim_scenes/func.py | 5 +++++ sim_scenes/solar_system/halley_comet_sim.py | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sim_scenes/func.py b/sim_scenes/func.py index 9e4e1ac..04dfb51 100644 --- a/sim_scenes/func.py +++ b/sim_scenes/func.py @@ -892,6 +892,11 @@ def camera_move_control(camera_move_infos, cond_cb, value_conv=None, smooth=None camera.position = p + e = next_info.get("exit", None) + if e: + print("自动退出...") + exit(0) + if __name__ == '__main__': # from bodies import Sun, Earth diff --git a/sim_scenes/solar_system/halley_comet_sim.py b/sim_scenes/solar_system/halley_comet_sim.py index 6873552..b2f174d 100644 --- a/sim_scenes/solar_system/halley_comet_sim.py +++ b/sim_scenes/solar_system/halley_comet_sim.py @@ -219,7 +219,8 @@ class HalleyCometSim(HalleyCometSimBase): (2048, {"f": 3}), (2062, {"y": -3}), (2063, {"y": -10, "z": 2}), - (20172, {}), + (2081, {}), + (2082, {"exit": True}) ] camera_move_control(camera_move_infos, -- GitLab