public override void LoadContent() { pauseImg = new GameObject(Textures.TextureName.Pause); pauseImg.LoadContent(); pauseImg.CenterIn(bounds); deadImg = new GameObject(Textures.TextureName.DeadRetry); deadImg.LoadContent(); deadImg.CenterIn(bounds); }
//The main loading of the level //Child classes (the actuall level objects) //should call this base method first to Init the basic stuff public virtual void Load(Textures.TextureName levelBackground) { loaded = true; border = new GameObject(Textures.TextureName.LevelBorder); border.LoadContent(); border.CenterIn(bounds); slider = new LevelSlider(levelBackground, bounds); slider.Load(); //Items itemMan = new ItemManager(ref slider); //Init data structures enemyShips = new List <Ship>(); enemyBullets = new List <Bullet>(); items = new List <Item>(); //Link the UpdateInfo to appropriate data SUI = new ShipUpdateInfo(); SUI.viewport = bounds; SUI.npcs = enemyShips; SUI.slider = this.slider; //Position the player ships foreach (Player p in PROP.players) { if (p.ControllerIndex == PlayerIndex.Two) { p.ship.MoveTo(GetPlayerInitPos()); p.ship.position.X += 60; } else { p.ship.MoveTo(GetPlayerInitPos()); } } }
//The main loading of the level //Child classes (the actuall level objects) //should call this base method first to Init the basic stuff public virtual void Load(Textures.TextureName levelBackground) { loaded = true; border = new GameObject(Textures.TextureName.LevelBorder); border.LoadContent(); border.CenterIn(bounds); slider = new LevelSlider(levelBackground, bounds); slider.Load(); //Items itemMan = new ItemManager(ref slider); //Init data structures enemyShips = new List<Ship>(); enemyBullets = new List<Bullet>(); items = new List<Item>(); //Link the UpdateInfo to appropriate data SUI = new ShipUpdateInfo(); SUI.viewport = bounds; SUI.npcs = enemyShips; SUI.slider = this.slider; //Position the player ships foreach (Player p in PROP.players) { if (p.ControllerIndex == PlayerIndex.Two) { p.ship.MoveTo(GetPlayerInitPos()); p.ship.position.X += 60; } else p.ship.MoveTo(GetPlayerInitPos()); } }
public override void LoadContent() { pauseImg = new GameObject(Textures.TextureName.Pause); pauseImg.LoadContent(); pauseImg.CenterIn(bounds); deadImg = new GameObject(Textures.TextureName.DeadRetry); deadImg.LoadContent(); deadImg.CenterIn(bounds); }