private void DrawDeepSpaceObjects(SpriteBatch spriteBatch) { foreach (GameObjectOverworld obj in deepSpaceGameObjects) { obj.Draw(spriteBatch); } for (int i = 0; i < deepSpaceGameObjects.Count; i++) { if (CollisionDetection.IsRectInRect(Game.player.Bounds, deepSpaceGameObjects[i].Bounds)) { if (!burnOutEnding.Activated) { if (deepSpaceGameObjects[i].Class == "Planet") { CollisionHandlingOverWorld.DrawRectAroundObject(Game, spriteBatch, deepSpaceGameObjects[i].Bounds); Game.helper.DisplayText("Press 'Enter' to enter planetary orbit."); } else if (deepSpaceGameObjects[i].Class == "Station") { CollisionHandlingOverWorld.DrawRectAroundObject(Game, spriteBatch, deepSpaceGameObjects[i].Bounds); Game.helper.DisplayText("Press 'Enter' to dock with station."); } } } foreach (GameObjectOverworld obj in effectsObjects) { obj.Draw(spriteBatch); } } }
public override void Draw(SpriteBatch spriteBatch) { base.Draw(spriteBatch); if ((ObjectiveIndex == 2) && CollisionDetection.IsRectInRect(Game.player.Bounds, allyShipRectangle)) { CollisionHandlingOverWorld.DrawRectAroundObject(Game, spriteBatch, allyShipRectangle); Game.helper.DisplayText("Press 'Enter' to speak with the Rebel fleet"); } }
public override void Draw(SpriteBatch spriteBatch) { base.Draw(spriteBatch); if (!started && GameStateManager.currentState.Equals("OverworldState") && CollisionDetection.IsRectInRect(game.player.Bounds, escortDataCapsule.ShipToDefend.Bounds)) { CollisionHandlingOverWorld.DrawRectAroundObject(game, spriteBatch, escortDataCapsule.ShipToDefend.Bounds); game.helper.DisplayText("Press 'Enter' to talk to freighter captain.."); } }
public virtual void Draw(SpriteBatch spriteBatch) { foreach (GameObjectOverworld obj in gameObjects) { obj.Draw(spriteBatch); } for (int i = 0; i < gameObjects.Count; i++) { if (CollisionDetection.IsRectInRect(game.player.Bounds, gameObjects[i].Bounds)) { if (!game.stateManager.overworldState.IsBurnOutEndingActivated) { if (gameObjects[i].Class == "Planet") { CollisionHandlingOverWorld.DrawRectAroundObject(game, spriteBatch, gameObjects[i].Bounds); game.helper.DisplayText("Press 'Enter' to enter planetary orbit."); } else if (gameObjects[i].Class == "Station") { CollisionHandlingOverWorld.DrawRectAroundObject(game, spriteBatch, gameObjects[i].Bounds); game.helper.DisplayText("Press 'Enter' to dock with station."); } else if (gameObjects[i] is Beacon && !game.player.HyperspeedOn) { CollisionHandlingOverWorld.DrawRectAroundObject(game, spriteBatch, gameObjects[i].Bounds); if (!((Beacon)gameObjects[i]).IsActivated) { game.helper.DisplayText("Press 'Enter' to activate beacon."); } else { game.helper.DisplayText("Press 'Enter' to interact with beacon."); } } else if (gameObjects[i] is SubInteractiveObject) { CollisionHandlingOverWorld.DrawRectAroundObject(game, spriteBatch, gameObjects[i].Bounds); game.helper.DisplayText("Press 'Enter' to investigate."); } } } } }