Worker units - UQdeco2800/2022-studio-3 GitHub Wiki
Worker units are a core part of the gameplay loop in the sense that they are used to gather resources for the player from around the map. There are two main types of worker units: miners and foragers.
- Miner units are used to collect stone and iron from Stone entities that are randomly generated around the map.
- Forager units are used to collect wood from Tree entities that are also randomly generated around the map.
- Builder units are used to fix buildings with resources (wood, metal, and stone) collected by the Miner and Forager.
On game start, two of each unit are spawned near the city centre. These units can then be selected by the player and moved towards resources. Upon colliding with a resource node, a worker unit will collect resources from that node and place them in their inventory. These resources can then be deposited back at home base, where they are added to the player's resource stockpile.
The following UML diagram is a representation of the classes used in the creation of worker units.