Training units
We have already done a lot of work to implement our Resource Store. As we create the Unit Store, we are going to reuse everything we have built, so it will be a bit easier and faster to have the Unit Store pop-up window configured and working.
Let us first start with the new scripts that are specific to the Unit Store configuration and then move on to the changes on the existing scripts and the UI. The upgrades on the Unit Store will be how we train the units to become stronger on the battlefield.
Configuring the Unit Store
The first script we are going to create is the message type that we will send when the unit has the upgrade level increased by the player. In the Project view, open the Scripts | MessageQueue | Messages | UI folder, and add a new script named UpgradeUnitMessage
. Replace the content with the following code block:
namespace Dragoncraft { public class UpgradeUnitMessage : IMessage { public UnitType...