SergioRibera / bevy_splash_screen

A plugin for bevy which allows you to create screens to show the brands and development teams behind your amazing game
https://crates.io/crates/bevy_splash_screen
Apache License 2.0
33 stars 6 forks source link

Skip screens with input #1

Closed lukecarr closed 1 year ago

lukecarr commented 1 year ago

It would be beneficial to have the option to skip a screen (or all screens) with player input.

I think a SkipSplashScreenEvent could be exposed that games can write to. This way, the game can fire this event with whatever logic they use to read input (Res<Input<...>>, leafwing_input_manager).

It would be helpful if the event struct had a boolean field to indicate if all (remaining) screens should be skipped or only the active one.

The alternative is just a public function on the splash screens resource that a system in the game can invoke. Guess it's personal preference as to which approach!

SergioRibera commented 1 year ago

@lukecarr The proposal is very interesting, unfortunately for the moment I think I could only get all the splash screens to be skipped, mostly because of the way it is developed and the way it uses the bevy_tweening to show the elements, although if you help me with a PR I will not get angry hahahahahah, for the moment I will do what I said, an event to skip all the screens

SergioRibera commented 1 year ago

@lukecarr The solution that I mentioned along with some details is implemented in the new version v0.3.0

And you can look the example here

lukecarr commented 1 year ago

@lukecarr The solution that I mentioned along with some details is implemented in the new version v0.3.0

And you can look the example here

Example looks great, exactly as I envisioned! Good job on the fast update!