mirror of
https://github.com/Yonokid/PyTaiko.git
synced 2026-02-04 19:50:12 +01:00
Ai to jouzai is now playable
This commit is contained in:
10
game.py
10
game.py
@@ -183,7 +183,7 @@ class GameScreen:
|
||||
'balloon_tail': self.texture_balloon_tail}
|
||||
|
||||
def init_tja(self):
|
||||
self.tja = tja_parser('Songs\\Dokidoki Mune-kyun Omatsuri Time')
|
||||
self.tja = tja_parser('Songs\\Ai to Jouzai no Mori')
|
||||
self.tja.get_metadata()
|
||||
self.tja.distance = self.width - self.judge_x
|
||||
|
||||
@@ -284,13 +284,15 @@ class Player:
|
||||
self.current_bars.append(self.draw_bar_list.popleft())
|
||||
|
||||
#Add note to current_notes list if it is ready to be shown on screen
|
||||
if game_screen.current_ms + 1000 >= self.play_note_list[0]['load_ms']:
|
||||
if game_screen.current_ms + 1000 >= self.play_note_list[0]['load_ms'] and len(self.play_note_list) > 0:
|
||||
self.current_notes.append(self.play_note_list.popleft())
|
||||
if self.play_note_list[0]['note'] == '8':
|
||||
self.current_notes.append(self.play_note_list.popleft())
|
||||
if game_screen.current_ms + 1000 >= self.draw_note_list[0]['load_ms']:
|
||||
if game_screen.current_ms + 1000 >= self.draw_note_list[0]['load_ms'] and len(self.draw_note_list) > 0:
|
||||
if self.draw_note_list[0]['note'] == '7':
|
||||
while self.draw_note_list[0]['note'] != '8':
|
||||
self.current_notes_draw.append(self.draw_note_list.popleft())
|
||||
if self.draw_note_list[0]['note'] == '8':
|
||||
else:
|
||||
self.current_notes_draw.append(self.draw_note_list.popleft())
|
||||
|
||||
#if a note was not hit within the window, remove it
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import time
|
||||
import os
|
||||
import pyray as ray
|
||||
import copy
|
||||
|
||||
from collections import deque
|
||||
|
||||
@@ -229,6 +230,6 @@ class tja_parser:
|
||||
# Sorting by load_ms is necessary for drawing, as some notes appear on the
|
||||
# screen slower regardless of when they reach the judge circle
|
||||
# Bars can be sorted like this because they don't need hit detection
|
||||
draw_note_list = deque(sorted(play_note_list, key=lambda d: d['load_ms']))
|
||||
draw_note_list = deque(sorted(copy.deepcopy(play_note_list), key=lambda d: d['load_ms']))
|
||||
bar_list = deque(sorted(bar_list, key=lambda d: d['load_ms']))
|
||||
return play_note_list, draw_note_list, bar_list
|
||||
|
||||
Reference in New Issue
Block a user