public ScreenManager(Screen activeScreen, List<Screen> screens) { this.activeScreen = activeScreen; //this.screens = new List<Screen>(screens.Count); //this.screens.AddRange(screens); this.screens = screens; }
public void setActiveScreen(int index) { for(int i=0; i<screens.Count; i++) { if(screens[i] == this.activeScreen) { screens[i].setActive(false); //break; } } this.activeScreen = screens[index]; this.activeScreen.setActive(true); }