void taskOnClick() { if (!Player.instance.playerProgress.isGameCompleted) { comp.toggleView(); } else { comp.endChoice.SetActive(true); } }
void OnTriggerStay2D(Collider2D col) { if (col.gameObject.CompareTag("Player") && Player.instance.actionButtion) { if (!uiComp.gameObject.activeSelf) { uiComp.gameObject.SetActive(true); comp.runStart(); } Player.instance.actionButtion = false; //comp.toggleView(); comp.toggleView(); } }