Пример #1
0
        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;
        }
Пример #2
0
        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);
            }
        }
Пример #3
0
 //Konstruktør
 public Scoreboard(GamePanel _GamePanel)
 {
     xCoord = 538;
     yCoord = 600;
 }