twas the commit before gogotime

This commit is contained in:
Anthony Samms
2025-09-19 22:57:35 -04:00
parent f371cbb2e5
commit 3709697eb0
3 changed files with 49 additions and 34 deletions

View File

@@ -1,8 +1,8 @@
import pyray as ray
from libs.global_objects import Indicator
from libs.utils import get_current_ms
from libs.texture import tex
from scenes.game import NoteArc
class DevScreen:
@@ -16,7 +16,8 @@ class DevScreen:
if not self.screen_init:
self.screen_init = True
tex.load_screen_textures('game')
self.indicator = Indicator(Indicator.State.SELECT)
self.mask_shader = ray.load_shader("", "shader/mask.fs")
self.note_arc = NoteArc(4, get_current_ms(), 1, True, True)
def on_screen_end(self, next_screen: str):
self.screen_init = False
@@ -24,30 +25,15 @@ class DevScreen:
def update(self):
self.on_screen_start()
self.indicator.update(get_current_ms())
self.note_arc.update(get_current_ms())
if ray.is_key_pressed(ray.KeyboardKey.KEY_ENTER):
return self.on_screen_end('GAME')
elif ray.is_key_pressed(ray.KeyboardKey.KEY_RIGHT):
self.length += 1
print(self.length)
elif ray.is_key_pressed(ray.KeyboardKey.KEY_LEFT):
self.length -= 1
print(self.length)
elif ray.is_key_pressed(ray.KeyboardKey.KEY_UP):
self.length += 10
print(self.length)
elif ray.is_key_pressed(ray.KeyboardKey.KEY_DOWN):
self.length -= 10
print(self.length)
elif ray.is_key_pressed(ray.KeyboardKey.KEY_SPACE):
self.note_arc = NoteArc(4, get_current_ms(), 1, True, True)
def draw(self):
ray.draw_rectangle(0, 0, 1280, 720, ray.GREEN)
start_position = 100
end_position = start_position + self.length
color = ray.WHITE
tex.draw_texture('notes', "8", frame=0, x=start_position+64, y=192, x2=self.length-47, color=color)
tex.draw_texture('notes', "drumroll_tail", x=end_position+64, y=192, color=color)
tex.draw_texture('notes', str(5), frame=0, x=start_position, y=192, color=color)
self.note_arc.draw(self.mask_shader)
def draw_3d(self):
pass