diff options
| author | Arnold <[email protected]> | 2021-12-26 18:39:15 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-12-26 18:39:15 -0500 |
| commit | b7dea8016b5b1328808e28b76cc12343907de63e (patch) | |
| tree | 5339c23bbde03c4d6c8c79d96b2033ab9e838ec0 /app/systems/title_screen.rb | |
| parent | f70283e5ad5f5a5744ca0695a184f72f88803aca (diff) | |
| download | SteelWings-b7dea8016b5b1328808e28b76cc12343907de63e.tar.gz SteelWings-b7dea8016b5b1328808e28b76cc12343907de63e.zip | |
implement ai randomizer, gameover screen, and other bug fixes
* Cleaned up factory. Fixed most bugs with death(last bug should be with move camera).
* check if player entity is nil before shooting or moving camera
* implement ai randomizer
* separate button click detection to new system
* implement gameover screen with button to return to menu
* use reverse_each instead of cloning
Co-authored-by: realtradam <[email protected]>
Diffstat (limited to 'app/systems/title_screen.rb')
| -rw-r--r-- | app/systems/title_screen.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/app/systems/title_screen.rb b/app/systems/title_screen.rb deleted file mode 100644 index 3f16a26..0000000 --- a/app/systems/title_screen.rb +++ /dev/null @@ -1,26 +0,0 @@ -FF::Scn::TitleScreen.add( - FF::Sys.new('TitleScreen', priority: 50) do - FF::Cmp::SingletonTitle[0].entities.each do |entity| - next unless entity.components.key?(FF::Cmp::Button) - - btn = entity.components[FF::Cmp::Button][0] - sprite = entity.components[FF::Cmp::Sprite][0] - hitbox = entity.components[FF::Cmp::Hitbox][0] - mouse = $gtk.args.inputs.mouse - - if mouse.x > hitbox.x and mouse.x < hitbox.x + hitbox.w and mouse.y > hitbox.y and mouse.y < hitbox.y + hitbox.h - if $gtk.args.inputs.mouse.down - btn.clicked = true - sprite.props[:path] = btn.pressed_sprite_path - elsif $gtk.args.inputs.mouse.up and btn.clicked - btn.clicked = false - sprite.props[:path] = btn.unpressed_sprite_path - btn.action.call - end - else - btn.clicked = false - sprite.props[:path] = btn.unpressed_sprite_path - end - end - end -) |
