Hunger and Thirst icon code guidelines - UQdeco2800/2021-ext-studio-2 GitHub Wiki

Contents

The hunger icon and thirst icon display in main menu when player have no water/food and disappeare when player pick a new one.

Fooddisplay

[FoodDisplay.java](https://github.com/UQdeco2800/2021-ext-studio-2/blob/main/source/core/src/main/com/deco2800/game/components/foodAndwater/FoodDisplay.java) When player have no food, there is a hungerIcon display in mian game screen

          if(foodImage.size() <= 0){
              table1.reset();
              table1.top().left();
              table1.setFillParent(true);
              table1.padTop(260f).padLeft(60f);
              table1.add(hungerIcon).size(50f).pad(3);
          }
      
## Waterdisplay [FoodDisplay.java](https://github.com/UQdeco2800/2021-ext-studio-2/blob/main/source/core/src/main/com/deco2800/game/components/foodAndwater/WaterDisplay.java) When player have no water, there is a thirstIcon display in mian game screen
if(waterImage.size() <= 0){
                table1.reset();
                table1.top().left();
                table1.setFillParent(true);
                table1.padTop(260f).padLeft(5f);
                table1.add(thirstIcon).size(50f).pad(3);
            }
        
⚠️ **GitHub.com Fallback** ⚠️