We are almost done developing all the features required for our RTS game, so now, we are going to add resource generation to the game. Resource generation is a feature that will automatically produce one specific resource type, and we will add scripts to make it possible to control how much of a resource is generated per second and a multiplier that will increase resource generation.
So far in our project, we have created a script named ResourceType, which has an enum with the resource types of Gold, Wood, and Food. The usage of the ResourceType enum is in the ResourceUpdater script, which is responsible for receiving a message of the UpdateResourceMessage type and updating each resource amount in the top-right corner of the UI. We also have a debug script, ResourceDebugger, to send the message of the UpdateResourceMessage type and test the UI update.
Now, we are going to add information about the production per second and the production level to each resource...