// first time initialization private void Initialize() { Completed = false; // initialize game model FlagshipGame = new FlagshipGame(); // intialize console Shell = new Libtcod.LibtcodShell("StarRL", 160, 90); // intialize view var MainScreen = new MainScreen(Shell) { GrabHorizontal = true, GrabVertical = true }; // initialize view model MainViewModel = new MainViewModel(FlagshipGame, MainScreen); MainViewModel.DisplayMainMenu(); Shell.AddControl(MainScreen); Shell.Resize(); // intialize game update tick updateTimer = new Timer(100); updateTimer.Elapsed += new ElapsedEventHandler(updateTimer_Elapsed); updateTimer.Start(); lastUpdateTime = DateTime.Now; lastDrawTime = DateTime.Now; }
// first time initialization private void Initialize() { Completed = false; // intialize console Shell = new Libtcod.LibtcodShell("Console Lib Test", 160, 90); // intialize view var mainScreen = new MainScreen(Shell) { GrabHorizontal = true, GrabVertical = true }; Shell.AddControl(new LayoutData(mainScreen) { }); Shell.Resize(); }