mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 03:30:13 +01:00
minor fixes
This commit is contained in:
2
.github/workflows/python-app.yml
vendored
2
.github/workflows/python-app.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
uv add nuitka
|
||||
- name: Build Executable
|
||||
run: |
|
||||
uv run nuitka --mode=app --include-module=raylib,moviepy,numpy,sounddevice,soundfile,tomlkit --noinclude-setuptools-mode=nofollow --noinclude-IPython-mode=nofollow --assume-yes-for-downloads PyTaiko.py
|
||||
uv run nuitka --mode=app --include-module=raylib,moviepy,numpy,sounddevice,soundfile,gitpython,tomlkit --noinclude-setuptools-mode=nofollow --noinclude-IPython-mode=nofollow --assume-yes-for-downloads PyTaiko.py
|
||||
- name: Create Release Directory
|
||||
run: |
|
||||
mkdir -p release
|
||||
|
||||
@@ -16,8 +16,8 @@ class VideoPlayer:
|
||||
self.audio = audio.load_music_stream_from_data(self.video.audio.to_soundarray(), sample_rate=self.video.audio.fps)
|
||||
|
||||
self.buffer_size = 10 # Number of frames to keep in memory
|
||||
self.frame_buffer = {} # Dictionary to store frames {timestamp: texture}
|
||||
self.frame_timestamps = [(i * 1000) / self.video.fps for i in range(int(self.video.duration * self.video.fps) + 1)]
|
||||
self.frame_buffer: dict[float, ray.Texture] = dict() # Dictionary to store frames {timestamp: texture}
|
||||
self.frame_timestamps: list[float] = [(i * 1000) / self.video.fps for i in range(int(self.video.duration * self.video.fps) + 1)]
|
||||
|
||||
self.start_ms = None
|
||||
self.frame_index = 0
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
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.transition = Transition(self.height, 'TRIPLE HELIX', 'Yonokid')
|
||||
|
||||
def on_screen_start(self):
|
||||
if not self.screen_init:
|
||||
@@ -21,16 +17,11 @@ class DevScreen:
|
||||
|
||||
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):
|
||||
self.transition.draw(self.height)
|
||||
pass
|
||||
|
||||
def draw_3d(self):
|
||||
pass
|
||||
|
||||
@@ -26,10 +26,10 @@ class EntryScreen:
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.screen_init = False
|
||||
self.box_titles: list[tuple[OutlinedText, OutlinedText]] = [(OutlinedText('演奏ゲーム', 50, ray.Color(255, 255, 255, 255), ray.Color(109, 68, 24, 255), outline_thickness=5, vertical=True),
|
||||
OutlinedText('演奏ゲーム', 50, ray.Color(255, 255, 255, 255), ray.Color(0, 0, 0, 255), outline_thickness=5, vertical=True)),
|
||||
(OutlinedText('ゲーム設定', 50, ray.Color(255, 255, 255, 255), ray.Color(109, 68, 24, 255), outline_thickness=5, vertical=True),
|
||||
OutlinedText('ゲーム設定', 50, ray.Color(255, 255, 255, 255), ray.Color(0, 0, 0, 255), outline_thickness=5, vertical=True))]
|
||||
self.box_titles: list[tuple[OutlinedText, OutlinedText]] = [(OutlinedText('演奏ゲーム', 50, ray.WHITE, ray.Color(109, 68, 24, 255), outline_thickness=5, vertical=True),
|
||||
OutlinedText('演奏ゲーム', 50, ray.WHITE, ray.BLACK, outline_thickness=5, vertical=True)),
|
||||
(OutlinedText('ゲーム設定', 50, ray.WHITE, ray.Color(109, 68, 24, 255), outline_thickness=5, vertical=True),
|
||||
OutlinedText('ゲーム設定', 50, ray.WHITE, ray.BLACK, outline_thickness=5, vertical=True))]
|
||||
|
||||
def load_textures(self):
|
||||
self.textures = load_all_textures_from_zip(Path('Graphics/lumendata/entry.zip'))
|
||||
|
||||
Reference in New Issue
Block a user