public void displayConsequence() { oldConsequencePanel = consequencePanel; consequencePanel = Instantiate(consequencePrefab, opm.transform).GetComponentInChildren <ConsPanelManager>(); consequencePanel.init(); UpdateStatText(); }
public void nextRoom() { //Destroy old option panel if (oldConsequencePanel != null) { Destroy(oldConsequencePanel.gameObject); } if (opm != null) { Destroy(opm.gameObject); } if (consequencePanel != null) { Destroy(consequencePanel.gameObject); } //Update with new information updateWithRoomInformation(); UpdateStatText(); nextRoomButton.gameObject.GetComponentInChildren <Text>().text = "Take Action"; consequencePanel = null; oldConsequencePanel = null; newOPM(); }