예제 #1
0
 public void AddObject(GameObject o)
 {
     listOfGameObjects.Add(o);
 }
예제 #2
0
 public void RemoveObject(GameObject o)
 {
     listOfGameObjects.Remove(o);
 }
예제 #3
0
        private bool ObjectsCollide(GameObject first, GameObject second)
        {
            RectangleF rectFirst = first.GetObjectBounds();
            RectangleF rectSecond = second.GetObjectBounds();

            return rectFirst.IntersectsWith(rectSecond);
        }