public void EnteredVictimArea() { if (VictimRadius.GetComponent <UIAppear>().GetActive() && NotShownVictim) { TripleBtnBg.SetActive(false); EnableTripleBtn(); BleedingContainer.SetActive(true); NotShownVictim = false; } else if (!VictimRadius.GetComponent <UIAppear>().GetActive() && !NotShownVictim) { TripleBtnBg.SetActive(true); DisableTripleBtn(); CloseAll(); NotShownVictim = true; IsXClickable = false; } }
void Update() { Victim = GameObject.FindGameObjectWithTag("Victim"); VictimRadius = Victim.transform.Find("Radius").gameObject; ShowCommunicate(); EnteredVictimArea(); if (VictimRadius.GetComponent <UIAppear>().GetActive() || RescueRadius.GetComponent <RescueMeny>().GetActive()) { HowBtn.GetComponent <Button>().interactable = false; MenuBtn.GetComponent <Button>().interactable = false; if (IsXClickable) { TripleBtnClose.GetComponent <Button>().interactable = true; } else { TripleBtnClose.GetComponent <Button>().interactable = false; } if (IsTripleMidClickable) { TripleMid.GetComponent <Button>().interactable = true; TripleBtnBg.GetComponent <Button>().interactable = true; TripleBot.GetComponent <Button>().interactable = false; } if (IsTutorialFinished) { TripleBot.GetComponent <Button>().interactable = true; } } else { TripleBtnClose.GetComponent <Button>().interactable = true; TutorialBtnReact.TripleBtnToggle(false); HowBtn.GetComponent <Button>().interactable = true; MenuBtn.GetComponent <Button>().interactable = true; } }