-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrlviser_py.pyi
78 lines (62 loc) · 2.46 KB
/
rlviser_py.pyi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
from typing import Sequence, Optional
from RocketSim import BallState, CarState, GameMode, CarConfig
type TVec3 = tuple[float, float, float]
"""
The items are (X, Y, Z) respectively
"""
type TRotmat = tuple[TVec3, TVec3, TVec3]
"""
The items are (forward, right, up) respectively
"""
type TBall = tuple[TVec3, TRotmat, TVec3, TVec3]
"""
The items are (location, rotation, velocity, angular velocity) respectively
"""
type TCar = tuple[int, TVec3, TRotmat, TVec3, TVec3, float, bool, bool, bool, float]
"""
The items are (car_id, location, rotation, velocity, angular velocity, boost, has jumped, has double jumped, has flipped, demo respawn timer) respectively
"""
def set_boost_pad_locations(locations: Sequence[TVec3]) -> ...:
pass
def get_state_set() -> Optional[tuple[Sequence[float], TBall, Sequence[TCar]]]:
"""
Sequence[float] - Boost pad states, 0 for full and some positive value for the time in seconds until it respawns
TBall - Ball state
Sequence[TCar] - Car states
"""
pass
def get_game_speed() -> float:
"""
Returns the current wanted game speed. Default is 1.0 if there has been no request from RLViser to change it.
The game speed is a multiplier of the game speed, 1.0 is normal speed, 2.0 is double speed, etc.
"""
pass
def get_game_paused() -> bool:
"""
Returns the current wanted game pause state. Default is False if there has been no request from RLViser to change it.
True means the game is paused, False means the game is unpaused.
"""
def report_game_speed(speed: float) -> ...:
"""
Reports the current game speed to RLViser. This is used to update the game speed in the UI and to properly interpolate the game state.
NOTE: This is only needed when RLViser did not request the game speed change.
"""
pass
def report_game_paused(paused: bool) -> ...:
"""
Reports the current game pause state to RLViser. This is used to update the game pause state in the UI.
NOTE: This is only needed when RLViser did not request the game pause state change.
"""
pass
type CarData = tuple[int, int, CarConfig, CarState]
"""
The items are (car_id, team, car_config, car_state) respectively
"""
def render(tick_count: int, tick_rate: float, game_mode: GameMode, boost_pad_states: Sequence[bool], ball: BallState, cars: Sequence[CarData]) -> ...:
pass
def launch():
"""
Opens RLViser. Useful if `quit()` was called and you want to open it again.
"""
def quit() -> ...:
pass