/* void sceneChanged(Notification notification) { npcs = GameObject.FindGameObjectsWithTag("TalkingNpc"); npcs = null; }*/ void playerWannaTalk(Notification notification) { if (npc != null) { string text; script = npc.gameObject.GetComponent("NpcController") as NpcController; text = script.getText(); if (text != "") { Variables.text=text; NotificationCenter.DefaultCenter().PostNotification(this, "drawText"); } else { NotificationCenter.DefaultCenter().PostNotification(this, "hideText"); } } }
/* void sceneChanged(Notification notification) * { * npcs = GameObject.FindGameObjectsWithTag("TalkingNpc"); * npcs = null; * }*/ void playerWannaTalk(Notification notification) { if (npc != null) { string text; script = npc.gameObject.GetComponent("NpcController") as NpcController; text = script.getText(); if (text != "") { Variables.text = text; NotificationCenter.DefaultCenter().PostNotification(this, "drawText"); } else { NotificationCenter.DefaultCenter().PostNotification(this, "hideText"); } } }