Sean-Nishi / M1Wengine

A action-adventure game developed with Python 3.11.1 and pygame. Complete missions before timer expires.
3 stars 0 forks source link

Create ActionQueueDisplay #368

Open Sean-Nishi opened 8 months ago

Sean-Nishi commented 8 months ago

Inherits from sprite.Group In constructor, pass in box rect from HUD Contains a queue of Entities to characterize the next PlayerActionIcon for the player. (import queue) Created in HUD init using add_box then populate stuff inside of box. Private method to move Icons around in box. Public methods to add and remove Icons from the queue, parameters: Action Enum. Update method will call: Remove method use handle.kill() to remove from sprite group the use queue.remove() to remove from queue, return that Update. Every time Player.py's pop_next_player_action() called, update HUD, which will update the ActionQueueDisplay queue check list contents. Look inside