Inspired by Clash of Clans chest system, this is an attempt to build it implement Design patterns and OOPS.
The goal for this project was -
- Implement Design patterns and OOPS
- Spawn Random chests
- Add Timer to each chest for unlocking
- Generate random coins and Gems on completion
- Click on Generate! button to generate random chest, only 4 slots available
- You can choose to either use gems to unlock directly or run timer to unlock them
- Once completed, you can collect from chest
In this project, I have implemented -
- MVC for each entity
- Service Locator manage all services
- State Machine for Chest States
- Command Pattern to undo Gem transaction
Looking at the folder structure you can see the order in which I have arranged scripts. The whole idea was make codebase modular and easy to use.
This was a extensive learning project, where I got to implement 4 design pattern simultaneously and learn and how to manage code base and establish script communication.