void Ignite() { if (central == null) { central = GameObject.Find("Central").GetComponent <Central>(); } central.ActOnEvent(LITLANTERN); lit = true; }
//This is only here to allow for the Chest (FLJ, 1/31/2021) void OnCollisionEnter(Collision collision) { if (ObjectHasTag(collision.gameObject, "Chest")) { //automatic swap what's on hand with what's stored (FLJ, 1/31/2021) if (HasItem("Lantern")) { central.ActOnEvent(OFFLANTERN); } GameObject temp = primaryItem; primaryItem = secondaryItem; secondaryItem = temp; central.ActOnEvent(CHESTSTOREITEM); if (HasItem("Lantern")) { central.ActOnEvent(LITLANTERN); } //canStore = true; } if (ObjectHasTag(collision.gameObject, "EndGame") && primaryItem != null && primaryItem.tag == "Treasure") { SceneManager.LoadScene("VictoryScreen", LoadSceneMode.Additive); } }