Today I have worked on the inventory system for Escape Plan Z. The system is very simplistic and is really just a matter of being able to do conditional checks in a orderly fashion. By this I mean that the inventory consists of:
- SortedDictionary – key,value pairs of : Key : InventoryItem (enum), Value: bool (exists in inventory)
- Methods for adding, checking and clearing the inventory
I tried this simple system out with the new keycard I’ve added for controlling the Bridge. See demonstration in video below.
I also took time to make some adjustments in ContextHandler adding a method for displaying a message a certain amount time on screen and another more specific message method in exception cases when general cases not are enough. Furthermore I refactored my StatusDisplay class and renamed it into InventoryDisplay. The class is now following the Singleton pattern and the UI display is showing 3 different slots for items equipped in the inventory.
Next up will probably be to add the game timer and handle end game conditions.