minor changes

This commit is contained in:
Yonokid
2025-07-27 21:35:14 -04:00
parent 53eeb69243
commit 03a95b2de7
5 changed files with 181 additions and 76 deletions

View File

@@ -1,17 +1,15 @@
import pyray as ray
from libs.utils import get_current_ms, is_l_don_pressed, is_r_don_pressed
from scenes.song_select import Transition
class DevScreen:
def __init__(self, width: int, height: int):
self.width = width
self.height = height
self.screen_init = False
self.model = ray.load_model("model/mikudon.obj")
self.model_position = ray.Vector3(-450.0, 100.0, -180.0)
self.model_scale = 1000.0
self.model_rotation_y = 45.0 # Face towards camera (rotate 180 degrees on Y-axis)
self.model_rotation_x = 0.0 # No up/down tilt
self.model_rotation_z = 0.0 # No roll
self.transition = Transition(self.height, 'TRIPLE HELIX', 'Yonokid')
def on_screen_start(self):
if not self.screen_init:
@@ -19,26 +17,20 @@ class DevScreen:
def on_screen_end(self, next_screen: str):
self.screen_init = False
ray.unload_model(self.model)
return next_screen
def update(self):
self.on_screen_start()
self.transition.update(get_current_ms())
if is_l_don_pressed() or is_r_don_pressed():
self.transition = Transition(self.height, 'TRIPLE HELIX', 'Yonokid')
if ray.is_key_pressed(ray.KeyboardKey.KEY_ENTER):
return self.on_screen_end('GAME')
def draw(self):
pass
self.transition.draw(self.height)
def draw_3d(self):
# Method 1: Using draw_model_ex for full control over rotation
rotation_axis = ray.Vector3(0.0, 1.0, 0.0) # Y-axis for horizontal rotation
ray.draw_model_ex(
self.model,
self.model_position,
rotation_axis,
self.model_rotation_y,
ray.Vector3(self.model_scale, self.model_scale, self.model_scale),
ray.WHITE
)
pass