fix double free bug, add logging, update to python 3.14

This commit is contained in:
Anthony Samms
2025-10-27 18:41:28 -04:00
parent 104ec726b0
commit 3b0a6bed97
29 changed files with 739 additions and 640 deletions

View File

@@ -1,38 +1,17 @@
import pyray as ray
from libs.utils import get_current_ms
from libs.texture import tex
from scenes.game import JudgeCounter
from libs.screen import Screen
class DevScreen:
def __init__(self):
self.width = 1280
self.height = 720
self.screen_init = False
self.length = 100
def on_screen_start(self):
if not self.screen_init:
self.screen_init = True
tex.load_screen_textures('game')
self.obj = JudgeCounter()
class DevScreen(Screen):
def on_screen_start(self, screen_name: str):
super().on_screen_start(screen_name)
def on_screen_end(self, next_screen: str):
self.screen_init = False
return next_screen
return super().on_screen_end(next_screen)
def update(self):
self.on_screen_start()
self.obj.update(0, 0, 0, 0)
if ray.is_key_pressed(ray.KeyboardKey.KEY_ENTER):
return self.on_screen_end('GAME')
if ray.is_key_pressed(ray.KeyboardKey.KEY_SPACE):
self.obj = JudgeCounter()
super().update()
def draw(self):
ray.draw_rectangle(0, 0, 1280, 720, ray.GREEN)
self.obj.draw()
def draw_3d(self):
pass