remove old white box
This commit is contained in:
parent
cf11afe18c
commit
22995a01af
@ -7,8 +7,8 @@ fonts_folder = "libs/fonts"
|
|||||||
|
|
||||||
[window]
|
[window]
|
||||||
style = "None"
|
style = "None"
|
||||||
width = 1021
|
width = 2175
|
||||||
height = 1078
|
height = 1808
|
||||||
visible = true
|
visible = true
|
||||||
gui_scale = 1
|
gui_scale = 1
|
||||||
caption = "Difficult Rocket v{DR_version}"
|
caption = "Difficult Rocket v{DR_version}"
|
||||||
|
@ -3,7 +3,15 @@
|
|||||||
|
|
||||||
- 最新版本号
|
- 最新版本号
|
||||||
- DR game: 0.2.0.0
|
- DR game: 0.2.0.0
|
||||||
- DR rs: 0.2.10.1
|
- DR rs: 0.2.11.0
|
||||||
|
|
||||||
|
## DR rs 0.2.11.0
|
||||||
|
|
||||||
|
### 添加
|
||||||
|
|
||||||
|
- `Python::data::PySR1Ship`
|
||||||
|
- `get_part_box(&self, part_id: i64) -> Option<(f64, f64), (f64, f64)>`
|
||||||
|
- 用于获取对应 id 的碰撞箱
|
||||||
|
|
||||||
## DR game 0.2.0.0
|
## DR game 0.2.0.0
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ package_path = 'Difficult_Rocket_rs'
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='Difficult_Rocket_rs',
|
name='Difficult_Rocket_rs',
|
||||||
version="0.2.10.1",
|
version="0.2.11.0",
|
||||||
author='shenjackyuanjie',
|
author='shenjackyuanjie',
|
||||||
author_email='3695888@qq.com',
|
author_email='3695888@qq.com',
|
||||||
rust_extensions=[RustExtension(target="Difficult_Rocket_rs.Difficult_Rocket_rs",
|
rust_extensions=[RustExtension(target="Difficult_Rocket_rs.Difficult_Rocket_rs",
|
||||||
|
@ -26,7 +26,7 @@ enum LoadState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[pyfunction]
|
#[pyfunction]
|
||||||
fn get_version_str() -> String { "0.2.10.1".to_string() }
|
fn get_version_str() -> String { "0.2.11.0".to_string() }
|
||||||
|
|
||||||
#[pyfunction]
|
#[pyfunction]
|
||||||
fn test_call(py_obj: &PyAny) -> PyResult<bool> {
|
fn test_call(py_obj: &PyAny) -> PyResult<bool> {
|
||||||
|
@ -17,7 +17,7 @@ from Difficult_Rocket.api.mod import ModInfo
|
|||||||
from Difficult_Rocket.client import ClientWindow
|
from Difficult_Rocket.client import ClientWindow
|
||||||
from Difficult_Rocket.api.types import Options, Version
|
from Difficult_Rocket.api.types import Options, Version
|
||||||
|
|
||||||
DR_rust_version = Version("0.2.10.1") # DR_mod 的 Rust 编写部分的兼容版本
|
DR_rust_version = Version("0.2.11.0") # DR_mod 的 Rust 编写部分的兼容版本
|
||||||
|
|
||||||
logger = logging.getLogger('client.dr_game')
|
logger = logging.getLogger('client.dr_game')
|
||||||
|
|
||||||
|
@ -192,39 +192,26 @@ class SR1ShipRender(BaseScreen):
|
|||||||
cache_sprite.y = cache_sprite.y - cache_sprite.scale_y / 2
|
cache_sprite.y = cache_sprite.y - cache_sprite.scale_y / 2
|
||||||
self.parts_sprite[part.id] = cache_sprite
|
self.parts_sprite[part.id] = cache_sprite
|
||||||
|
|
||||||
part_width = 100
|
|
||||||
part_height = 100
|
|
||||||
|
|
||||||
if DR_mod_runtime.use_DR_rust:
|
if DR_mod_runtime.use_DR_rust:
|
||||||
part_type = self.part_list_rs.get_part_type(part.p_type)
|
|
||||||
part_debug_box = self.rust_ship.get_part_box(part.id)
|
part_debug_box = self.rust_ship.get_part_box(part.id)
|
||||||
if part_type is not None:
|
if part_debug_box:
|
||||||
part_width = part_type.width * 15
|
# 线框
|
||||||
part_height = part_type.height * 15
|
part_line_box = []
|
||||||
# 白色框框
|
width = 3
|
||||||
part_box = Rectangle(x=render_x, y=render_y,
|
color = (random.randrange(0, 255), random.randrange(0, 255), random.randrange(0, 255), random.randrange(0, 255))
|
||||||
width=part_width, height=part_height,
|
part_line_box.append(Line(x=part_debug_box[0][0] * 30, y=part_debug_box[0][1] * 30,
|
||||||
batch=self.part_box_batch, group=self.part_group)
|
x2=part_debug_box[0][0] * 30, y2=part_debug_box[1][1] * 30,
|
||||||
part_box.rotation = SR1Rotation.get_rotation(part.angle)
|
batch=self.part_box_batch, width=width, color=color))
|
||||||
part_box.opacity = 50
|
part_line_box.append(Line(x=part_debug_box[0][0] * 30, y=part_debug_box[1][1] * 30,
|
||||||
self.part_box_dict[part.id] = part_box
|
x2=part_debug_box[1][0] * 30, y2=part_debug_box[1][1] * 30,
|
||||||
# 线框
|
batch=self.part_box_batch, width=width, color=color))
|
||||||
part_line_box = []
|
part_line_box.append(Line(x=part_debug_box[1][0] * 30, y=part_debug_box[1][1] * 30,
|
||||||
width = 3
|
x2=part_debug_box[1][0] * 30, y2=part_debug_box[0][1] * 30,
|
||||||
color = (random.randrange(0, 255), random.randrange(0, 255), random.randrange(0, 255), random.randrange(0, 255))
|
batch=self.part_box_batch, width=width, color=color))
|
||||||
part_line_box.append(Line(x=part_debug_box[0][0] * 30, y=part_debug_box[0][1] * 30,
|
part_line_box.append(Line(x=part_debug_box[1][0] * 30, y=part_debug_box[0][1] * 30,
|
||||||
x2=part_debug_box[0][0] * 30, y2=part_debug_box[1][1] * 30,
|
x2=part_debug_box[0][0] * 30, y2=part_debug_box[0][1] * 30,
|
||||||
batch=self.part_box_batch, width=width, color=color))
|
batch=self.part_box_batch, width=width, color=color))
|
||||||
part_line_box.append(Line(x=part_debug_box[0][0] * 30, y=part_debug_box[1][1] * 30,
|
self.part_line_box[part.id] = part_line_box
|
||||||
x2=part_debug_box[1][0] * 30, y2=part_debug_box[1][1] * 30,
|
|
||||||
batch=self.part_box_batch, width=width, color=color))
|
|
||||||
part_line_box.append(Line(x=part_debug_box[1][0] * 30, y=part_debug_box[1][1] * 30,
|
|
||||||
x2=part_debug_box[1][0] * 30, y2=part_debug_box[0][1] * 30,
|
|
||||||
batch=self.part_box_batch, width=width, color=color))
|
|
||||||
part_line_box.append(Line(x=part_debug_box[1][0] * 30, y=part_debug_box[0][1] * 30,
|
|
||||||
x2=part_debug_box[0][0] * 30, y2=part_debug_box[0][1] * 30,
|
|
||||||
batch=self.part_box_batch, width=width, color=color))
|
|
||||||
self.part_line_box[part.id] = part_line_box
|
|
||||||
# if not part_render: # 如果不渲染(渲染有毛病)
|
# if not part_render: # 如果不渲染(渲染有毛病)
|
||||||
# self.parts_sprite[part.id].visible = False
|
# self.parts_sprite[part.id].visible = False
|
||||||
count += 1
|
count += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user