void Start() { isStandingOnQuestionmarkWeapons = false; isStandingOnQuestionmarkHTP = false; isStandingOnQuestionmarkLockSniper = false; isStandingOnQuestionmarkLockLauncher = false; UI_element_weapons.SetActive(false); UI_element_htp.SetActive(false); UI_element_sniper_lock.SetActive(false); UI_element_launcher_lock.SetActive(false); gameplayCanvas.SetActive(true); }
void Update() { if (isStandingOnQuestionmarkWeapons) { UI_element_weapons.SetActive(true); UI_element_htp.SetActive(false); if (UI_element_launcher_lock != null) { UI_element_launcher_lock.SetActive(false); } if (UI_element_sniper_lock != null) { UI_element_sniper_lock.SetActive(false); } weaponHolder.SetActive(false); gameplayCanvas.SetActive(false); } else if (isStandingOnQuestionmarkHTP) { UI_element_weapons.SetActive(false); UI_element_htp.SetActive(true); if (UI_element_launcher_lock != null) { UI_element_launcher_lock.SetActive(false); } if (UI_element_sniper_lock != null) { UI_element_sniper_lock.SetActive(false); } weaponHolder.SetActive(false); gameplayCanvas.SetActive(false); } else if (isStandingOnQuestionmarkLockSniper) { UI_element_weapons.SetActive(false); UI_element_htp.SetActive(false); if (UI_element_launcher_lock != null) { UI_element_launcher_lock.SetActive(false); } if (UI_element_sniper_lock != null) { UI_element_sniper_lock.SetActive(true); } weaponHolder.SetActive(true); gameplayCanvas.SetActive(false); } else if (isStandingOnQuestionmarkLockLauncher) { UI_element_weapons.SetActive(false); UI_element_htp.SetActive(false); if (UI_element_launcher_lock != null) { UI_element_launcher_lock.SetActive(true); } if (UI_element_sniper_lock != null) { UI_element_sniper_lock.SetActive(false); } weaponHolder.SetActive(true); gameplayCanvas.SetActive(false); } else { UI_element_weapons.SetActive(false); UI_element_htp.SetActive(false); if (UI_element_launcher_lock != null) { UI_element_launcher_lock.SetActive(false); } if (UI_element_sniper_lock != null) { UI_element_sniper_lock.SetActive(false); } gameplayCanvas.SetActive(true); weaponHolder.SetActive(true); } }