diff --git a/Difficult_Rocket/__init__.py b/Difficult_Rocket/__init__.py index ef8ed66..77285ad 100644 --- a/Difficult_Rocket/__init__.py +++ b/Difficult_Rocket/__init__.py @@ -10,7 +10,7 @@ from pathlib import Path from Difficult_Rocket.api.types import Options, Version -sdk_version = Version("0.8.6.0") # SDK 版本 +sdk_version = Version("0.8.7.0") # SDK 版本 build_version = Version("2.1.3.0") # 编译文件版本(与游戏本体无关) Api_version = Version("0.1.1.0") # API 版本 __version__ = sdk_version diff --git a/Difficult_Rocket/utils/camera.py b/Difficult_Rocket/utils/camera.py index e447d1b..01b7419 100644 --- a/Difficult_Rocket/utils/camera.py +++ b/Difficult_Rocket/utils/camera.py @@ -173,7 +173,7 @@ class GroupCamera(Group): def reset(self): self._view_x = 0 self._view_y = 0 - self._zoom = 1 + self.zoom = 1 def set_state(self): self._previous_view = self._window.view diff --git a/docs/src/change_log/dr_game.md b/docs/src/change_log/dr_game.md index 142a092..dbfa64f 100644 --- a/docs/src/change_log/dr_game.md +++ b/docs/src/change_log/dr_game.md @@ -2,9 +2,16 @@ # DR game/DR rs 更新日志 - 最新版本号 - - DR game: 0.3.2.1 + - DR game: 0.3.3.0 - DR rs: 0.2.21.0 +## 20230812 DR game 0.3.3.0 + +### Changes + +- 将 `sr1_ship` 渲染器使用的 Camera 改成 `CenterGroupCamera` +- 删除了之前的 Camera 相关代码 + ## 20230809 DR game 0.3.2.1 ### Fix diff --git a/docs/src/change_log/dr_sdk.md b/docs/src/change_log/dr_sdk.md index 8e48f95..47cb50c 100644 --- a/docs/src/change_log/dr_sdk.md +++ b/docs/src/change_log/dr_sdk.md @@ -2,7 +2,30 @@ # DR SDK 更新日志 - 最新版本号 - - DR sdk: 0.8.6.0 + - DR sdk: 0.8.7.0 + - DR api: 0.1.1.0 + +## DR sdk 0.8.7.0 + +### Add + +- 添加了 `Difficult_Rocket.utils.camera.GroupCamera` + - 和 `Difficult_Rocket.utils.camera.CenterGroupCamera` + - 实际上就是使用 `pyglet.graphics.Group` 来实现的 `Camera` + - 具有相同的功能 + - 顺便同样在 `api.camera` 里添加了导出 + - 这次我一定不会再忘记导出了 + - Added `Difficult_Rocket.utils.camera.GroupCamera` + - And `Difficult_Rocket.utils.camera.CenterGroupCamera` + - Actually, it is implemented `Camera` using `pyglet.graphics.Group` + - Has the same function + - By the way, the export was also added in `api.camera` + - This time I will never forget to export it again +- 为所有 `xxCamera` 添加了 + - `reset` 方法 + - 用于一键重置缩放+平移 + - Added `reset` method for all `xxCamera` + - Used to reset zoom + translation with one click ## DR sdk 0.8.6.1 diff --git a/mods/dr_game/__init__.py b/mods/dr_game/__init__.py index 7d31502..bcc9bbb 100644 --- a/mods/dr_game/__init__.py +++ b/mods/dr_game/__init__.py @@ -53,7 +53,7 @@ DR_mod_runtime = _DR_mod_runtime() class DR_mod(ModInfo): # NOQA mod_id = "difficult_rocket_mod" name = "Difficult Rocket mod" - version = Version("0.3.2.1") + version = Version("0.3.3.0") writer = "shenjackyuanjie" link = "shenjack.top" diff --git a/mods/dr_game/sr1_ship.py b/mods/dr_game/sr1_ship.py index a562110..47e5159 100644 --- a/mods/dr_game/sr1_ship.py +++ b/mods/dr_game/sr1_ship.py @@ -20,15 +20,15 @@ from pyglet.shapes import Line, Rectangle from pyglet.image import Framebuffer, Texture from . import DR_mod_runtime +from .types import SR1Textures, SR1Rotation # Difficult Rocket from Difficult_Rocket import DR_status from Difficult_Rocket.utils.translate import Tr -from Difficult_Rocket.api.camera import CenterCamera, CenterGroupCamera from Difficult_Rocket.api.types import Fonts, Options from Difficult_Rocket.command.line import CommandText from Difficult_Rocket.client.screen import BaseScreen -from .types import SR1Textures, SR1Rotation +from Difficult_Rocket.api.camera import CenterGroupCamera if TYPE_CHECKING: from Difficult_Rocket.client import ClientWindow