void OnGUI() { // if not paused if (gameModel.pauseStatus == TeamBrookvale.Game.PauseStatus.RUN) { // place in front of the counter icon GUI.depth = 0; // Draw the Active Tool Icon GUI.DrawTexture(iconRect, inventoryModel.getCurrentInvItem().icon); isButtonPushed = GUI.RepeatButton(iconRect, "", ""); } }
void OnGUI() { // if game is not paused if (gameModel.pauseStatus == TeamBrookvale.Game.PauseStatus.RUN) { if (inventoryModel.getCurrentInvItem().id == TeamBrookvale.Game.InvItem.IDType.SmokeBombActive || inventoryModel.getCurrentInvItem().id == TeamBrookvale.Game.InvItem.IDType.SmokeBombInactive /* || * inventoryModel.getCurrentInvItem().id == TeamBrookvale.Game.InvItem.IDType.TimeBombActive || * inventoryModel.getCurrentInvItem().id == TeamBrookvale.Game.InvItem.IDType.TimeBombInactive || * inventoryModel.getCurrentInvItem().id == TeamBrookvale.Game.InvItem.IDType.TimeBombInactiveTick*/) { // place behind the tool icon GUI.depth = 1; // not button, but should appear the same as the others GUI.DrawTexture(iconRect, counterIcon); // show the text i.e. "1" GUI.Label( textRect, inventoryModel.getCurrentInvItemText(), textGuiStyle); } } }