2023-01-20 17:41:43 +08:00
|
|
|
# -------------------------------
|
|
|
|
# Difficult Rocket
|
2023-01-23 23:46:43 +08:00
|
|
|
# Copyright © 2020-2023 by shenjackyuanjie 3695888@qq.com
|
2023-01-20 17:41:43 +08:00
|
|
|
# All rights reserved
|
|
|
|
# -------------------------------
|
|
|
|
|
2023-01-23 00:01:01 +08:00
|
|
|
from .lib import *
|
2023-01-23 01:58:07 +08:00
|
|
|
|
2023-02-19 16:56:30 +08:00
|
|
|
from typing import TYPE_CHECKING, Dict, Tuple, Optional
|
2023-01-23 01:58:07 +08:00
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
2023-01-23 23:46:43 +08:00
|
|
|
from Difficult_Rocket.client.screen import BaseScreen
|
2023-01-24 12:25:23 +08:00
|
|
|
from Difficult_Rocket.api.types.SR1 import SR1PartData
|
2023-01-23 01:58:07 +08:00
|
|
|
from Difficult_Rocket.client.render.sr1_ship import SR1ShipRender, SR1ShipRender_Option
|
|
|
|
|
2023-01-31 22:07:18 +08:00
|
|
|
from pyglet.window import Window
|
|
|
|
|
2023-01-23 01:58:07 +08:00
|
|
|
def test_call(py_obj) -> bool: ...
|
|
|
|
|
2023-01-24 12:25:23 +08:00
|
|
|
def get_version_str() -> str: ...
|
2023-01-24 08:24:31 +08:00
|
|
|
|
2023-02-12 21:19:17 +08:00
|
|
|
def simluation() -> None: ...
|
2023-02-19 11:47:15 +08:00
|
|
|
""" 用来测试 rust 的物理模拟能不能用 """
|
|
|
|
|
2023-02-19 16:56:30 +08:00
|
|
|
def part_list_read_test(file_name: Optional[str] = "./configs/PartList.xml") -> None: ...
|
|
|
|
|
2023-01-24 08:24:31 +08:00
|
|
|
class PartDatas:
|
|
|
|
""" 用于在 PyObj 里塞一个浓眉大眼的 HashMap<uszie, SR1PartData>"""
|
2023-01-24 12:25:23 +08:00
|
|
|
def __new__(cls, py_part_data: Dict[int, SR1PartData]) -> "PartDatas": ...
|
|
|
|
|
2023-01-24 19:49:46 +08:00
|
|
|
def get_rust_pointer(self) -> int: ...
|
|
|
|
|
2023-01-24 12:25:23 +08:00
|
|
|
def better_update_parts(render: SR1ShipRender,
|
|
|
|
option: SR1ShipRender_Option,
|
|
|
|
window: BaseScreen,
|
2023-01-24 23:59:07 +08:00
|
|
|
parts: PartDatas,
|
|
|
|
sr1_xml_scale: int) -> bool: ...
|
2023-01-24 12:25:23 +08:00
|
|
|
|
2023-01-31 22:07:18 +08:00
|
|
|
class Camera_rs:
|
|
|
|
""" 用于闲的没事 用 rust 写一个 camera """
|
|
|
|
def __new__(cls, window: Window,
|
|
|
|
zoom: float = 1.0,
|
|
|
|
dx: float = 1.0, dy: float = 1.0,
|
|
|
|
min_zoom: float = 1.0,
|
|
|
|
max_zoom: float = 1.0): ...
|
|
|
|
|
2023-02-02 12:11:29 +08:00
|
|
|
@property
|
|
|
|
def dx(self) -> float: ...
|
|
|
|
|
|
|
|
@property
|
|
|
|
def dy(self) -> float: ...
|
|
|
|
|
|
|
|
@property
|
|
|
|
def zoom(self) -> float: ...
|
|
|
|
|
|
|
|
@property
|
|
|
|
def position(self) -> Tuple[float, float]: ...
|
|
|
|
|
2023-02-01 12:45:23 +08:00
|
|
|
def begin(self) -> None: ...
|
2023-01-31 22:07:18 +08:00
|
|
|
|
|
|
|
def end(self) -> None: ...
|
|
|
|
|
|
|
|
def __enter__(self, window) -> None: ...
|
2023-01-24 08:24:31 +08:00
|
|
|
|
2023-01-31 22:07:18 +08:00
|
|
|
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
2023-02-02 12:11:29 +08:00
|
|
|
|
|
|
|
|
2023-02-12 23:08:45 +08:00
|
|
|
class PartFrame_rs:
|
|
|
|
...
|
|
|
|
|
|
|
|
|
2023-02-02 16:10:21 +08:00
|
|
|
# class CenterCamera_rs(Camera_rs):
|
|
|
|
# """ 用于依旧闲的没事 用 rust 写一个中央对齐的 camera """
|