public bool Intersects(PlayerOne playerOne) { if (Player_box.Intersects(new Rectangle((int)playerOne.Position.X, (int)playerOne.Position.Y, (int)playerOne.Size.X, (int)playerOne.Size.Y))) { return true; } return false; }
public Game1() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; int i = 0; while (i < 11) { Portal portal = new Portal(200 * i, 100 * i, graphics); portal.portD = random.Next(10, 25); portals.Add(portal); i++; } playerOne = new PlayerOne(400, 500, graphics); playerTwo = new PlayerTwo(1600, 500, graphics); graphics.PreferredBackBufferHeight = 1080; graphics.PreferredBackBufferWidth = 1920; if (graphics.IsFullScreen) { graphics.ToggleFullScreen(); } }