public FrmGame(FrmMenu formMenu) { InitializeComponent(); FormSettings.SetSetting(this); MenuForm = formMenu; GameEngine = new GameEngine(this, MenuForm); }
public FrmGameRecords(FrmMenu frmMenu) { InitializeComponent(); FormSettings.SetSetting(this); MenuForm = frmMenu; try { using (var context = new RoadFighterDataEnt()) { var records = context.GameRecords.Select(x => new { x.Name, x.Score, x.Crash, x.GameID }) .OrderByDescending(x => x.Score) .ToList(); dtgRecords.DataSource = records; } } catch (Exception) { MessageBox.Show("Nie udało się połączyć z bazą danych"); } }
public FrmEndGame(FrmGame game, FrmMenu menuUI, string description, int score, int crash) { InitializeComponent(); FormSettings.SetSetting(this); ActualGame = game; MenuUI = menuUI; GameScore = score; GameCrash = crash; lblDescription.Text = description; lblScore.Text = "SCORE: " + score.ToString(); }
public FrmEndGame(FrmGame game, FrmMenu menuUI, string description, int score, int crash, string message) { InitializeComponent(); FormSettings.SetSetting(this); ActualGame = game; MenuUI = menuUI; GameScore = score; GameCrash = crash; lblDescription.Text = description; lblScore.Text = message; btnConfirm.Enabled = false; txbYourName.Enabled = false; }
public GameEngine(FrmGame gameForm, FrmMenu menuForm) { FormGame = gameForm; MenuForm = menuForm; Road = new RoadBox(FormGame, this); Grass = new GreenBox(FormGame, Road.random); SceneTimer = gameForm.tmrSceneTimer; GameTimer = gameForm.tmrGameTimer; FinishGame = gameForm.tmrFinishGame; SpeedGame = 5; SpeedMax = 10; SpeedMin = 1; Crash = 0; }
public FrmControls(FrmMenu menuForm) { InitializeComponent(); FormSettings.SetSetting(this); MenuForm = menuForm; }