public void hideUpgrades() { canvas.enabled = false; player.setMovable(true); midgameNPC.changeSpeechFile("upgradeFinish"); midgameNPC.ContinueAdvancing(); midgameNPC.branchConversation(); }
void showNPC() { npc.gameObject.SetActive(true); Player player = GameObject.Find("Player").GetComponent <Player>(); int playerHealth, maxHealth; playerHealth = player.getHealth(); maxHealth = player.getMaxHealth(); if (playerHealth >= (maxHealth * 3 / 4)) { Debug.Log("ended round with high HP"); npc.changeSpeechFile("roundEndHighHP"); } else if (playerHealth >= (maxHealth * 1 / 4)) { Debug.Log("ended round with ok HP"); npc.changeSpeechFile("roundEndMidHP"); } else { Debug.Log("ended round with low hp"); npc.changeSpeechFile("roundEndLowHP"); } }