void OnTriggerEnter(Collider other) { Debug.Log(other.transform.tag); if (other.gameObject.tag == "Player") { lc.Key = true; GUIControll gc = (GUIControll)FindObjectOfType(typeof(GUIControll)); gc.HasKey(lc); Destroy(gameObject); } }
IEnumerator DestroyAnim() { Destroy(jail); gnome.SetBool("Rescued", true); yield return(new WaitForSeconds(10)); lc.Rescued++; GUIControll gc = (GUIControll)FindObjectOfType(typeof(GUIControll)); gc.RescuedGnome(lc); Destroy(gameObject); }
public void Enter(PlayerMachine.Data playerControll) { data = playerControll; gui = Object.FindObjectOfType <GUIControll>(); if (gui.GUIEnabled.mission.Equipment.activeSelf == true) { isExit = true; } else { isExit = false; } gui.GUIEnabled.mission.Equipment.SetActive(true); gui.GUIEnabled.mission.Equipment.GetComponent <EquipmentPanel>().Enter(data.character); gui.GUIEnabled.mission.Equipment.GetComponent <EquipmentPanel>().SetPoints(data.points); data.lineRender[0].enabled = false; }