Normális stáblista + trigger fix

This commit is contained in:
markojozsef
2026-10-18 18:58:29 +02:00
parent c4bce574c1
commit 8da11de906
3 changed files with 55 additions and 10 deletions

View File

@@ -4,30 +4,71 @@ import assets
import gamestate import gamestate
CREDITS_MUSIC = "mus_credits" CREDITS_MUSIC = "mus_credits"
CREDITS_LENGTH = 10 SCROLL_START_TIME = 2
SCROLL_SPEED = 5 SCROLL_SPEED = 5
CREDITS_LENGTH = ((37 * 13) + SCROLL_START_TIME) / SCROLL_SPEED
CREDITS_TEXT = """Gratulálok, sikerült kivinni a játékot!
cred_text = text.TextRenderer(128, 180, None, True)
==Programozás==
Markó József Attila
ChatGPT
Gemini
Claude
==Vizúális dizájn==
Markó József Attila
Kazuko Shibuya
(Kefka sprite)
Akihiko Miura & Kouichi Ooyama
(Mother 3 betűtípus)
==Zene==
Yoko Shimomura
(The Demon King Odio)
Rick Astley; Toby Fox; KrazedDonut
(Rick Buster)
Nobuo Uematsu
(The decisive Battle)
The Living Tombstone; JimboV
(The World Revolving, but I Can't Fix You)
Cazok
(The Final Battle)
Stevie T & Tokyo Speirs
(Subliminal Tie)
Vége!
"""
cred_text = text.TextRenderer(128, 100, None, True)
end_text = text.TextRenderer(128, 100, None, True) end_text = text.TextRenderer(128, 100, None, True)
end_visible = False ended = False
t = 0 t = 0
def switch(game): def switch(game):
assets.sounds[CREDITS_MUSIC].play() assets.sounds[CREDITS_MUSIC].play()
cred_text.reset("Gratulálunk, sikerült kivinni a játékot!\n\n\n\n\n\n\n==Programozás==\nMarkó József Attila\n\n") cred_text.reset(CREDITS_TEXT)
cred_text.type_all() cred_text.type_all()
end_text.reset("Vége!") end_text.reset("Vége!")
end_text.type_all() end_text.type_all()
def update(game, dt): def update(game, dt):
global t, end_visible global t, ended
t += dt t += dt
if t >= SCROLL_START_TIME:
cred_text.move(0, dt * SCROLL_SPEED) cred_text.move(0, dt * SCROLL_SPEED)
if t >= CREDITS_LENGTH: if t >= CREDITS_LENGTH and not ended:
end_visible = True ended = True
cred_text.backtrack(5)
def draw(game): def draw(game):
cred_text.render() cred_text.render()
if end_visible: if ended:
end_text.render() end_text.render()

View File

@@ -92,7 +92,7 @@ def start_battle(battle_id):
def switch(game): def switch(game):
if len(objects) == 1: if len(objects) == 1:
gamestate.switch_gamestate(game, "credits") gamestate.switch_gamestate(game, "credits")
return
global music_box global music_box
in_battle_transition = False in_battle_transition = False
overworld.set_player_world_pos(game, balthasar.x, balthasar.y) overworld.set_player_world_pos(game, balthasar.x, balthasar.y)

View File

@@ -83,6 +83,10 @@ class TextRenderer:
for s in self.sprites: for s in self.sprites:
s[1] = s[1].move(x, y) s[1] = s[1].move(x, y)
def backtrack(self, n):
if n > 0:
self.sprites = self.sprites[:-n]
# !!! ChatGPT !!! # !!! ChatGPT !!!
def render(self, discoloration=(255,255,255)): def render(self, discoloration=(255,255,255)):
offsets = [] offsets = []