Esempio n. 1
0
 public virtual void CheckMand(Mand mijnMand, Game mijnForm)
 {
     if (((mijnMand.mijnXMand < balX) && (balX < mijnMand.mijnXMand + 100)) && (((mijnMand.mijnYMand < balY) && (balY < mijnMand.mijnYMand + 100))))
     {
         // bal of bom in in mand
         mijnMand.AddPoint(mijnWaarde);
         Respawn();
     }
 }
Esempio n. 2
0
        public override void CheckMand(Mand mijnMand, Game mijnForm)
        {
            int ymand = mijnForm.ClientRectangle.Height - mijnMand.mijnGrote;

            if ((mijnMand.mijnXMand < balX + groote) && ((mijnMand.mijnXMand + mijnMand.mijnGrote > balX) && ((mijnMand.mijnYMand < balY + groote) && (mijnMand.mijnYMand + mijnMand.mijnGrote > balY))))   //test test in mand
            {
                if (aftellerExplosie > 17)
                {
                    mijnMand.AddPoint(mijnWaarde);
                    Omplof(true);
                }
            }
        }
Esempio n. 3
0
        public Game(string naam1, string naam2, Controls controls1, Controls controls2)
        {
            Controls1 = controls1;
            Controls2 = controls2;
            Naam1     = naam1;
            Naam2     = naam2;
            InitializeComponent();
            Paint += new PaintEventHandler(MijnPaint);

            // start beweging timer
            System.Windows.Forms.Timer bewegingTimer = new System.Windows.Forms.Timer
            {
                Interval = 1  // milisec
            };
            bewegingTimer.Tick += new System.EventHandler(BewegingTimerTick);
            bewegingTimer.Start();

            //start fps timer
            System.Windows.Forms.Timer refreshScreenTimer = new System.Windows.Forms.Timer
            {
                Interval = 1000 / FPS  // milisec
            };
            refreshScreenTimer.Tick += new System.EventHandler(refreshScreenTimerTick);
            refreshScreenTimer.Start();


            DoubleBuffered = true;
            int mandGrote = 100;

            mand1 = new Mand(300, ClientRectangle.Height - mandGrote, 0, 0, Naam1, 0, mandGrote, (float)0.4, (float)0.9, 10, 30, 5, @"../../files/images/manden/mand1.png");
            mand2 = new Mand(800, ClientRectangle.Height - mandGrote, 0, 0, Naam2, 0, mandGrote, (float)0.4, (float)0.9, 10, 30, 5, @"../../files/images/manden/mand2.png");

            explosions = new string[16];
            for (int i = 0; i < 16; i++)
            {
                explosions[i] = @"../../files/images/ballen/explosion/" + Convert.ToString(i + 1) + ".gif";
            }
            bom = new Bom(300, 10, 5, 0, 40, (float)0.40, (float)0.60, -10, @"../../files/sounds/grote_rekkerbalbots.wav", @"../../files/images/ballen/bom.png", explosions);
        }