jheredia / pack-it-up

Frantic packing action game about a group of backpackers working together to complete their trip while trying to keep their luggage and sanity.
1 stars 1 forks source link

Timer System & UI #5

Closed jheredia closed 1 week ago

jheredia commented 2 weeks ago

As a player, at the start of each level I should be aware that there's a timer that dictates how much time do I have left to complete the level.

This timer should be customizable via serialized fields so the duration of the level can be fine tuned, by default, this timer should be of 60 seconds.

The timer should expose a method to start or react to a start timer event, in both scenarios the timer will start the countdown to zero. Whenever the timer starts, it should start from the value it is provided (In the default case, 60 seconds), it shouldn't start in any other value than the one provided.

If the timer reaches zero, then it should emit an event that notifies everyone listening that the timer has run out, if this happens, the timer shouldn't go below zero.

The timer should also expose a method to stop or react to a stop timer event, in both cases the timer will stop the countdown in whatever value it is.

Each time the value of the timer changes, it should correctly reflect in the UI, thus it should have a Text UI Component that will be updated every second.

The UI of the timer is not set right now, inspiration can be taken from the likes of Overcooked, Moving Out, 60 Seconds

Image

Image

Image

Image

But if any other inspiration comes to mind, feel free to share it with the rest of the team and come to an agreement which respects the art direction.