public void loadGameView() { nisan = new RegularNisan(); bojaNisana = Color.FromArgb(0, 255, 0); generisiPoeneLabelu(); generisiAmmoLabelu(); generateStopericu(); resizeForm(); loadGameControlls(); Transform = new Matrix(); }
private void gameCanvas_Click(object sender, EventArgs e) { crosshair.submitHit(cursorX, cursorY); if (!ammoController.shoot()) { bojaNisana = Color.FromArgb(0, 255, 0); nisan = new RegularNisan(); crosshair = new Crosshair(this); } ammoLabel.Text = "B=>" + ammoController.getBazooka().ToString() + " P=>" + ammoController.getPiercing(); }
public void krajIgre() { this.vreme = 0; ammoController = new AmmoController(nizMunicije); bojaNisana = Color.FromArgb(0, 255, 0); crosshair = new Crosshair(this); nisan = new RegularNisan(); this.stopericaTimer.Stop(); lobbyForm.readyClick = false; this.lobbyForm.gameNotEnd = false; lobbyForm.WindowState = FormWindowState.Normal; this.lobbyForm.Size = new Size(950, 500); deleteGameView(); this.lobbyForm.setWallPaper(); this.lobbyForm.scoreView(); this.lobbyForm.Invalidate(); if (cursorFlag == false) { Cursor.Show(); } }
public void lobbyForm_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Q && ammoController.setBazooka()) { nisan = new BazookaNisan(); crosshair = new Bazooka(105, this); } else if (e.KeyCode == Keys.W && ammoController.setPiercing()) { bojaNisana = Color.FromArgb(255, 255, 127, 80); nisan = new PiercingNisan(); crosshair = new Piercing(this); } else if (e.KeyCode == Keys.E && ammoController.setRegular()) { bojaNisana = Color.FromArgb(0, 255, 0); nisan = new RegularNisan(); crosshair = new Crosshair(this); } canvas.Invalidate(); }