add clear/fc/fail animation

This commit is contained in:
Anthony Samms
2025-10-12 02:51:43 -04:00
parent 92b089b07c
commit 0999a2034b
6 changed files with 195 additions and 22 deletions

View File

@@ -2,7 +2,7 @@ import pyray as ray
from libs.utils import get_current_ms
from libs.texture import tex
from scenes.game import BranchIndicator
from scenes.game import FCAnimation
class DevScreen:
@@ -16,7 +16,7 @@ class DevScreen:
if not self.screen_init:
self.screen_init = True
tex.load_screen_textures('game')
self.obj = BranchIndicator()
self.obj = FCAnimation()
def on_screen_end(self, next_screen: str):
self.screen_init = False
@@ -27,14 +27,8 @@ class DevScreen:
self.obj.update(get_current_ms())
if ray.is_key_pressed(ray.KeyboardKey.KEY_ENTER):
return self.on_screen_end('GAME')
elif ray.is_key_pressed(ray.KeyboardKey.KEY_UP):
self.obj.level_up('master')
elif ray.is_key_pressed(ray.KeyboardKey.KEY_DOWN):
self.obj.level_down('expert')
elif ray.is_key_pressed(ray.KeyboardKey.KEY_LEFT):
self.obj.level_up('expert')
elif ray.is_key_pressed(ray.KeyboardKey.KEY_RIGHT):
self.obj.level_down('normal')
if ray.is_key_pressed(ray.KeyboardKey.KEY_SPACE):
self.obj = FCAnimation()
def draw(self):
ray.draw_rectangle(0, 0, 1280, 720, ray.GREEN)