mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 11:40:13 +01:00
refactoring
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import pyray as ray
|
||||
|
||||
from libs.audio import audio
|
||||
from libs.utils import GlobalData
|
||||
from libs.utils import global_data
|
||||
|
||||
|
||||
class ResultScreen:
|
||||
@@ -12,12 +12,13 @@ class ResultScreen:
|
||||
|
||||
def update(self):
|
||||
if ray.is_key_pressed(ray.KeyboardKey.KEY_ENTER):
|
||||
global_data.songs_played += 1
|
||||
audio.play_sound(self.sound_don)
|
||||
return "SONG_SELECT"
|
||||
|
||||
def draw(self):
|
||||
ray.draw_text(f"{GlobalData.selected_song}", 100, 60, 20, ray.BLACK)
|
||||
ray.draw_text(f"SCORE: {GlobalData.result_score}", 100, 80, 20, ray.BLACK)
|
||||
ray.draw_text(f"GOOD: {GlobalData.result_good}", 100, 100, 20, ray.BLACK)
|
||||
ray.draw_text(f"OK: {GlobalData.result_ok}", 100, 120, 20, ray.BLACK)
|
||||
ray.draw_text(f"BAD: {GlobalData.result_bad}", 100, 140, 20, ray.BLACK)
|
||||
ray.draw_text(f"{global_data.selected_song}", 100, 60, 20, ray.BLACK)
|
||||
ray.draw_text(f"SCORE: {global_data.result_score}", 100, 80, 20, ray.BLACK)
|
||||
ray.draw_text(f"GOOD: {global_data.result_good}", 100, 100, 20, ray.BLACK)
|
||||
ray.draw_text(f"OK: {global_data.result_ok}", 100, 120, 20, ray.BLACK)
|
||||
ray.draw_text(f"BAD: {global_data.result_bad}", 100, 140, 20, ray.BLACK)
|
||||
|
||||
Reference in New Issue
Block a user