mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
more minor bug fixes
This commit is contained in:
@@ -1,14 +1,6 @@
|
||||
import pyray as ray
|
||||
|
||||
from libs.texture import tex
|
||||
from libs.utils import (
|
||||
get_current_ms,
|
||||
is_l_don_pressed,
|
||||
is_l_kat_pressed,
|
||||
is_r_don_pressed,
|
||||
is_r_kat_pressed,
|
||||
)
|
||||
from scenes.game import KusudamaAnimation
|
||||
from libs.utils import global_data, session_data
|
||||
|
||||
|
||||
class DevScreen:
|
||||
@@ -20,9 +12,10 @@ class DevScreen:
|
||||
def on_screen_start(self):
|
||||
if not self.screen_init:
|
||||
self.screen_init = True
|
||||
tex.load_screen_textures('game')
|
||||
self.kusudama = None
|
||||
self.count = 0
|
||||
session_data.result_score = 961000
|
||||
session_data.result_good = 100
|
||||
session_data.result_max_combo = 20
|
||||
session_data.result_total_drumroll = 40
|
||||
|
||||
def on_screen_end(self, next_screen: str):
|
||||
self.screen_init = False
|
||||
@@ -30,25 +23,12 @@ class DevScreen:
|
||||
|
||||
def update(self):
|
||||
self.on_screen_start()
|
||||
if self.kusudama is not None:
|
||||
self.kusudama.update(get_current_ms(), self.count == 100)
|
||||
if self.kusudama.is_finished:
|
||||
self.kusudama = None
|
||||
if is_l_kat_pressed() or is_r_kat_pressed():
|
||||
self.kusudama = KusudamaAnimation(100)
|
||||
self.count = 0
|
||||
|
||||
if is_l_don_pressed() or is_r_don_pressed():
|
||||
if self.kusudama is not None:
|
||||
self.count += 1
|
||||
self.kusudama.update_count(self.count)
|
||||
|
||||
if ray.is_key_pressed(ray.KeyboardKey.KEY_ENTER):
|
||||
return self.on_screen_end('RESULT')
|
||||
|
||||
def draw(self):
|
||||
if self.kusudama is not None:
|
||||
self.kusudama.draw()
|
||||
pass
|
||||
|
||||
def draw_3d(self):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user