private bool OutOfBounds(PlayerInteractable m) { if (m.Position.X < 0 || m.Position.X > graphics.PreferredBackBufferWidth) return true; else if (m.Position.Y < 0 || m.Position.Y > graphics.PreferredBackBufferHeight) return true; else return false; }
private void CollisionDetection(Player s, PlayerInteractable p, int index) { if (s.BoundingBox.Intersects(p.BoundingBox)) { if (p.GetType() == typeof(Multiplier)) scoreMultiplier++; else p.ActivateAbility(s); playerInteractableList.RemoveAt(index); } }