If in the previous section we have seen how the sweet-tooth pandas can defeat the player, now it's time to give the player a way to stop them. The first step is to have enough sugar to build cupcakes towers. As such, we need a sugar meter to keep track of the amount of sugar that the player possesses.
As we have seen in our design, this will be a number, and not a bar like the health. Therefore, even if the concepts are similar, the implementation is slightly different.
The process for creating the sugar meter is similar to the health bar, so let's start to create a new Image, parented with the Canvas, named
Sugar_Meter. As a Sprite, you can use the
ui_sugar_meter file in the
Graphic/UI folder. Place ...