public Collision( Main gameManager, LevelOne level, PlayerShip player, Minimap miniMap) { m_gameManager = gameManager; m_level = level; m_player = player; m_miniMap = miniMap; }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here //Load in player ship with bullet textures m_playerShip = new PlayerShip(Content.Load<Texture2D>("PlayerShip"), Content.Load<Texture2D>("Bullet"), Content.Load<Texture2D>("PlayerEnergy")); //Load in level one map with player, and required level textures, such as the asteroids, enemies, and enemy bullets //This is pretty hack, should probably call a LoadContent function within the level class, and initiate all required textures there. m_levelOne = new LevelOne(m_playerShip, Content.Load<Texture2D>("BasicBlueBackground"), Content.Load<Texture2D>("Asteroid"), Content.Load<Texture2D>("EnemyShip"), Content.Load<Texture2D>("EnemyBullet")); //Initialize player camera (focused on player) m_playerCamera = new PlayerCamera(GraphicsDevice.Viewport, 0.5f); //Load in mini map with level, camera, and required mini map textures such as... camera / enemies / allies //Mini-map needs handle to graphics device & spritebatch to initialize the map texture that will be drawn upon load m_miniMap = new Minimap(GraphicsDevice, spriteBatch, m_levelOne, m_playerCamera, Content.Load<Texture2D>("PlayerSphere"), Content.Load<Texture2D>("EnemySphere")); //Initialize collision engine, with ship, and level, and the minimap (to see if sprites should be displayed in the mini-map or not) m_collisionEngine = new Collision(this, m_levelOne, m_playerShip, m_miniMap); //Load in Screen management textures m_scrmngr_loadScreenText = Content.Load<Texture2D>("LoadingScreen"); m_scrmngr_gameOverScreen = Content.Load<Texture2D>("GameOverScreen"); }