From ff9259a0bb696b5533f5e9ebda3d18ef89be1d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E7=91=97=E6=9D=B0?= <3695888@qq.com> Date: Wed, 25 Jan 2023 11:11:45 +0800 Subject: [PATCH] add render reset --- Difficult_Rocket/client/render/sr1_ship.py | 9 +++++++-- docs/src/update_logs.md | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Difficult_Rocket/client/render/sr1_ship.py b/Difficult_Rocket/client/render/sr1_ship.py index 786dcd2..a9b800c 100644 --- a/Difficult_Rocket/client/render/sr1_ship.py +++ b/Difficult_Rocket/client/render/sr1_ship.py @@ -244,8 +244,13 @@ class SR1ShipRender(BaseScreen): def on_command(self, command: CommandText): if command.re_match('render'): - # self.render_ship() - self.need_draw = True + if command.re_match('reset'): + self.scale = 1 + self.dx = 0 + self.dy = 0 + else: + # self.render_ship() + self.need_draw = True print('应该渲染飞船的') elif command.re_match('debug'): print('sr ?') diff --git a/docs/src/update_logs.md b/docs/src/update_logs.md index 71991e7..38cfeb4 100644 --- a/docs/src/update_logs.md +++ b/docs/src/update_logs.md @@ -36,6 +36,9 @@ ### 命令 - 有点尴尬,`sr1` 的命令不大好使,改成 `debug` 了 +- `render` + - `reset` + - 用于重置现在这艘船的渲染 (避免你玩着玩着把船玩道不知道什么地方去了) ## 20230120 V 0.6.5.0