Thursday, 4 May 2017

Outside the Box Project Beta Work - Can Upgrade Defences Feedback

After some game testing from others in the class one of the most important pieces of feedback I received was to include some form of indication/feedback for the Player on when the Defences could be upgraded.

So I set to work making a script that managed feedback when the Defences could be upgrade I.e. when the Player had enough money to upgrade.


Figure 1.

All the FeedbackManager did was get a reference to the UpgradeComponent in the Inspector in Unity and in the if statement checked if a Boolean in the UpgradeComponent script had been set to True or False, if False the 3D model that represents the feedback would be switched off and of the Boolean was True then the feedback model would be turned on to be made visible.


Figure 2.

Figure 2.'s UpgradeComponent script was where the Player's money was checked against the cost of upgrading Defences, and if the Player had enough money then the CanUpgrade Boolean would be set to True, influencing the FeedbackManager.

Figure 3.
One can see in Figure 3. how this feedback appeared in-game. If the green ball is visible then the Player has enough money to upgrade that Defence.

No comments:

Post a Comment