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)); }
private void AddScore(Invader invader) { score += invader.Score; //score_label.Text = "Score: " + score; }