static void Main() { View.View.InitializeSets(); var game = new TheGame() { Rooms = Room.GetRooms(), State = States.Menu, RoomI = 0, MenuI = 0, IsDialog = false, IsEnding = false, Resolutions = new float[] { 0.91f, 1f, 1.27f, 0.85f }, ResolutionsStrings = new string[] { "1366x768", "1440x840", "1920x1080", "720x1080" }, CurrentResolution = 0, MaxResolution = 3 }; GameEvent.FillEvents(game); MyForm.CurrentGame = game; game.Menues = Model.Menu.GetMenues(); var form = new MyForm(game); Control.Control.DeadList = new Stack <GameObject>(); Application.Run(form); }
public Menu() { var buttonStart = new Button(); buttonStart.Text = "Start"; buttonStart.Location = new Point(1, 1); buttonStart.Click += (sender, args) => { var w = new MyForm(); w.Show(); this.Hide(); }; this.Controls.Add(buttonStart); }