public void RemoveScreen(UIScreenNames name) { if (m_Screens.ContainsKey(name)) { m_Screens.Remove(name); } }
public CommandQueueItem(UIScreenNames name, UICommand command, UIScreen screen, CommandCallback callback) { this.name = name; this.command = command; this.screen = screen; this.callback = callback; }
public void AddScreen(UIScreenNames name, UIScreen screen) { // check if the name already exists as a key in the dictionary if (m_Screens.ContainsKey(name) == false) { // add the screen to our list, it is now ready to take commands m_Screens.Add(name, screen); } }
public void SendCommand(UICommand command, UIScreenNames name, CommandCallback callback = null) { // check if the screen exists if (m_Screens.ContainsKey(name) == true) { // use the name in the command to get a reference of the screen from our dictionary UIScreen screen = m_Screens[name]; // create a new command object to be processed CommandQueueItem screenCommand = new CommandQueueItem(name, command, screen, callback); m_Commands.Add(screenCommand); } }