//Currently we only allow one of each typ to be queued. private static void addToEventQ(dialogEvent newEvent) { if (singleton.eventQueue.Find(x => x.eventType == newEvent.eventType) != null) { return; } singleton.eventQueue.Add(newEvent); }
/* * void Update(){ * if (showingDialogBox || eventQueue.Count == 0) * return; * showEvent (); * } */ private void showEvent() { showingDialogBox = true; dialogEvent theEvent = currentEvent;// eventQueue [0]; currentCallback = theEvent.callback; currentPanel = theEvent.eventType == DialogBoxType.GameState ? gameOverPanel : regularPanel; currentPanel.showPanel(theEvent.buttonText, theEvent.infoText, theEvent.infoSize, theEvent.buttonTextSize); //eventQueue.RemoveAt (0); }