public MainForm(LevelChooserForm LCForm, GameMode GameMode) { InitializeComponent(); con = new SqlCeConnection(@"Data Source=App_Data\Database.sdf"); cmd.Connection = con; Bckgr = new Background(); // карактер иницијализација Character = new Character(); // куршум (банани, инекции) BulletInjection = new Injection(); VectorCanShowUp = true; TmrMoving.Enabled = false; this.LCForm = LCForm; gamemode = GameMode; brush = new SolidBrush(Color.LightYellow); VectorVillian = new Vector(); this.DoubleBuffered = true; NewGame(); }
private void lblNextLevel_Click(object sender, EventArgs e) { switch (gamemode) { case GameMode.Easy: { LevelChooserForm LCF = new LevelChooserForm(null, this); LCF.MdiParent = this.MdiParent; LCF.Show(); LCF.Location = new Point(0, 0); } break; case GameMode.Medium: { LevelChooserForm LCF = new LevelChooserForm(null, this); LCF.MdiParent = this.MdiParent; LCF.Show(); LCF.Location = new Point(0, 0); } break; case GameMode.Hard: { lblNextLevel.Enabled = false; } break; default: break; } }
private void btnNew_Click(object sender, EventArgs e) { LevelChooserForm LCF = new LevelChooserForm(this, null); LCF.MdiParent = this.MdiParent; LCF.Show(); LCF.Location = new Point(0, 0); }