public Canon(GamePanel _GamePanel) { this._GamePanel = _GamePanel; shield = true; angle = Math.PI * 3/2; newImage = global::CityDefender.Properties.Resources.arrow; xCoord = (float)(300 + (400 * Math.Cos(angle))) - 15f; yCoord = (float)(800 + (400 * Math.Sin(angle))) - 40f; }
public Shield(GamePanel _MyPanel) { hitPoints = 3; shield = true; //Oppretter "hitbox" for skjoldet for (int i = 0; i < 96; i++) { rects[i] = new Rectangle((int)(300 + (400 * Math.Cos(Math.PI * 2 * i / 96))), (int)(800 + (400 * Math.Sin(Math.PI * 2 * i / 96))), 20, 20); } }
//Konstruktør public Scoreboard(GamePanel _GamePanel) { xCoord = 538; yCoord = 600; }