Beispiel #1
0
        public bool DetectCollision(Shot shot, Invader invader)
        {
            Rectangle ctrl1Rect = new Rectangle(shot.Location, shot.Size);
            Rectangle ctrl2Rect = new Rectangle(invader.Location, invader.Image.Size);

            return(ctrl1Rect.IntersectsWith(ctrl2Rect));
        }
Beispiel #2
0
 private void AddScore(Invader invader)
 {
     score += invader.Score;
     //score_label.Text = "Score: " + score;
 }