override public void Notify(float xCurs, float yCurs) { if (ColRect.Intersect(this.pFont.pFontSprite.pColRect, new ColRect(xCurs, yCurs, 1, 1))) { SceneContext.SetState(SceneContext.Scene.Select); } }
public override void Execute() { // Let the gameObject deal with this... //this.pAlien.Remove(); GameObject pA = (GameObject)this.pUFO; GameObject pB = (GameObject)Iterator.GetParent(pA); pA.Remove(); // TODO: update score - may need a better way (maybe an observer) SceneContext sc = SceneContext.GetInstance(); sc.GetState().UpdateScore(this.pUFO.GetScore()); // TODO: Splat Alien - needs a better way this.pSplat = new Splat(GameObject.Name.Splat, GameSprite.Name.SplatUFO, pUFO.x, pUFO.y); pSplat.ActivateCollisionSprite(this.pSB_Boxes); pSplat.ActivateGameSprite(this.pSB_Aliens); GameObject pSplatbRoot = GameObjectMan.Find(GameObject.Name.SplatRoot); Debug.Assert(pSplatbRoot != null); pSplatbRoot.Add(pSplat); TimerMan.Add(TimeEvent.Name.SplatRemoveUFO, new SplatRemoveEvent(this.pSplat), 0.5f); }
override public void Notify(float xCurs, float yCurs) { if (ColRect.Intersect(this.pFont.pFontSprite.pColRect, new ColRect(xCurs, yCurs, 1, 1))) { SceneContext.SetState(SceneContext.Scene.Aliens); SoundMan.PlaySound(Sound.Name.Shoot); } }
public static SceneContext GetInstance() { if (pInstance == null) { pInstance = new SceneContext(); } Debug.Assert(pInstance != null); return(pInstance); }
public override void Notify() { if (scenePlay.numLives > 1) { TimerMan.Add(TimeEvent.Name.RecreateShip, new ReCreateShipEvent(), 0.7f); } else { SceneContext sc = SceneContext.GetInstance(); sc.UpdateScreens(); } }
public override void Notify() { SceneContext pSceneContext = SceneContext.GetInstance(); Debug.Assert(pSceneContext != null); SceneState sceneState = pSceneContext.GetState(); if (pSceneContext.poScenePlayer2.numLives > 1) { pSceneContext.SetState(SceneContext.Scene.Player2); } }
public override void Notify() { SceneContext pSceneContext = SceneContext.GetInstance(); Debug.Assert(pSceneContext != null); SceneState sceneState = pSceneContext.GetState(); if (sceneState.name == SceneContext.Scene.Over) { pSceneContext.SetState(SceneContext.Scene.Select); } }
public override void Execute() { // Let the gameObject deal with this... //this.pAlien.Remove(); GameObject pA = (GameObject)this.pAlien; GameObject pB = (GameObject)Iterator.GetParent(pA); pA.Remove(); // TODO: Need a better way... if (privCheckParent(pB) == true) { GameObject pC = (GameObject)Iterator.GetParent(pB); pB.Remove(); if (privCheckParent(pC) == true) { //pC.Remove(); // Recreate Grid on last alien delete AlienGrid pGrid = (AlienGrid)pC; pGrid.GenerateAlien(GameObjectMan.GetActive()); pGrid.ResetSpeed(); this.scenePlay.AddLife(); } } // TODO: update score - may need a better way (maybe an observer) SceneContext sc = SceneContext.GetInstance(); sc.GetState().UpdateScore(this.pAlien.scoreValue); // TODO: Splat Alien - needs a better way this.pSplat = new Splat(GameObject.Name.Splat, GameSprite.Name.SplatAlien, pAlien.x, pAlien.y); pSplat.ActivateCollisionSprite(this.pSB_Boxes); pSplat.ActivateGameSprite(this.pSB_Aliens); GameObject pSplatbRoot = GameObjectMan.Find(GameObject.Name.SplatRoot); Debug.Assert(pSplatbRoot != null); pSplatbRoot.Add(pSplat); TimerMan.Add(TimeEvent.Name.SplatRemoveAlien, new SplatRemoveEvent(this.pSplat), 0.5f); }
//----------------------------------------------------------------------------- // Game::LoadContent() // Allows you to load all content needed for your engine, // such as objects, graphics, etc. //----------------------------------------------------------------------------- public override void LoadContent() { // -------------------- Create the Managers -------------------- Simulation.Create(); TimerManager.Create(5, 2); SoundManager.Create(9, 1); TextureManager.Create(1, 1); ImageManager.Create(5, 2); // REWORK - SpriteBatchMan // It's a singleton... but it holds an actual instance pointer to the SpriteBatchMan instance // this way scene can own their unique sprite batch man independent of other scenes // // SpriteBatchMan.Create(3, 1); // // Once you understand this... you have to do this for many other systems // SpriteNodeBatchManager.Create(); GameSpriteManager.Create(4, 4); BoxSpriteManager.Create(3, 1); ProxySpriteManager.Create(10, 1); GameObjectManager.Create(); CollPairManager.Create(5, 1); GlyphManager.Create(36, 1); FontManager.Create(1, 1); InputManager.Create(); pSceneContext = new SceneContext(); }
//----------------------------------------------------------------------------- // Game::LoadContent() // Allows you to load all content needed for your engine, // such as objects, graphics, etc. //----------------------------------------------------------------------------- public override void LoadContent() { //--------------------------------------------------------------------------------------------------------- // Initialize managers //--------------------------------------------------------------------------------------------------------- // Initialize and Add All Texture TextureMan.Initialize(); TextureMan.AddAll(); // Initialize and Add All image ImageMan.Initialize(); ImageMan.AddAll(); // Initialize and Add All Sprites GameSpriteMan.Initialize(); GameSpriteMan.AddAll(); // Initialize and Add All Sounds SoundMan.Initialize(); SoundMan.AddAll(); // Initialize Input and Output GlyphMan.Initialize(); GlyphMan.AddXml(GlyphName.Consolas36pt, "Consolas36pt.xml", TextureName.Consolas); FontMan.Initialize(); InputMan.Initialize(); // Initialize TimerEvents TimerMan.Initialize(); // Initialize GameObj and Collision PlayBatchMan.Initialize(); // ***** Scene ***** SceneContext.Initialize(); }
//----------------------------------------------------------------------------- // Game::LoadContent() // Allows you to load all content needed for your engine, // such as objects, graphics, etc. //----------------------------------------------------------------------------- public override void LoadContent() { //--------------------------------------------------------------------------------------------------------- // Setup Managers //--------------------------------------------------------------------------------------------------------- TextureMan.Create(1, 1); ImageMan.Create(5, 2); //GameSpriteMan.Create(4, 2); BoxSpriteMan.Create(3, 1); //TimerMan.Create(3, 1); ProxySpriteMan.Create(10, 1); //GameObjectMan.Create(3, 1); ColPairMan.Create(1, 1); GlyphMan.Create(3, 1); FontMan.Create(1, 1); SoundEngineMan.Create(3, 1); // Player Unique Systems SpriteBatchMan.Create(); GameSpriteMan.Create(); GameObjectMan.Create(); TimerMan.Create(); DelayedObjectMan.Create(); //--------------------------------------------------------------------------------------------------------- // Load the Textures //--------------------------------------------------------------------------------------------------------- TextureMan.Add(Texture.Name.Aliens, "Invaders_0.tga"); TextureMan.Add(Texture.Name.Shield, "Birds_N_shield.tga"); //--------------------------------------------------------------------------------------------------------- // Create Images //--------------------------------------------------------------------------------------------------------- // ----- Aliens ----- ImageMan.Add(Image.Name.SquidOpen, Texture.Name.Aliens, 616, 28, 112, 112); ImageMan.Add(Image.Name.SquidClosed, Texture.Name.Aliens, 616, 182, 112, 112); ImageMan.Add(Image.Name.CrabOpen, Texture.Name.Aliens, 321, 28, 155, 112); ImageMan.Add(Image.Name.CrabClosed, Texture.Name.Aliens, 321, 182, 155, 112); ImageMan.Add(Image.Name.OctopusOpen, Texture.Name.Aliens, 56, 28, 167, 112); ImageMan.Add(Image.Name.OctopusClosed, Texture.Name.Aliens, 56, 182, 167, 112); // ----- UFO ----- ImageMan.Add(Image.Name.UFO, Texture.Name.Aliens, 83, 503, 225, 98); // ----- Missile ----- ImageMan.Add(Image.Name.Missile, Texture.Name.Aliens, 420, 700, 15, 55); // ----- Ship ----- ImageMan.Add(Image.Name.Ship, Texture.Name.Aliens, 56, 336, 182, 112); // ----- Splats ----- ImageMan.Add(Image.Name.AlienSplat, Texture.Name.Aliens, 574, 490, 182, 112); ImageMan.Add(Image.Name.MissleSplat, Texture.Name.Aliens, 405, 490, 112, 112); ImageMan.Add(Image.Name.BombSplat, Texture.Name.Aliens, 699, 798, 84, 112); ImageMan.Add(Image.Name.UFOSplat, Texture.Name.Aliens, 41, 643, 294, 112); ImageMan.Add(Image.Name.ShipSplat, Texture.Name.Aliens, 307, 335, 210, 112); // ----- Bombs ----- ImageMan.Add(Image.Name.BombDragger, Texture.Name.Aliens, 280, 798, 42, 84); ImageMan.Add(Image.Name.BombZigZag, Texture.Name.Aliens, 574, 644, 42, 98); ImageMan.Add(Image.Name.BombRolling, Texture.Name.Aliens, 447, 797, 42, 98); ImageMan.Add(Image.Name.BombStraight, Texture.Name.Aliens, 377, 798, 14, 98); // ----- Shields ----- ImageMan.Add(Image.Name.Brick, Texture.Name.Shield, 20, 210, 10, 5); ImageMan.Add(Image.Name.BrickLeft_Top0, Texture.Name.Shield, 15, 180, 10, 5); ImageMan.Add(Image.Name.BrickLeft_Top1, Texture.Name.Shield, 15, 185, 10, 5); ImageMan.Add(Image.Name.BrickLeft_Bottom, Texture.Name.Shield, 35, 215, 10, 5); ImageMan.Add(Image.Name.BrickRight_Top0, Texture.Name.Shield, 75, 180, 10, 5); ImageMan.Add(Image.Name.BrickRight_Top1, Texture.Name.Shield, 75, 185, 10, 5); ImageMan.Add(Image.Name.BrickRight_Bottom, Texture.Name.Shield, 55, 215, 10, 5); //--------------------------------------------------------------------------------------------------------- // Create Scenes //--------------------------------------------------------------------------------------------------------- pSceneContext = SceneContext.GetInstance(); }
public override void Notify() { this.pAlienGrid = (AlienGrid)this.pSubject.pObjA; PlayerMan.WriteHighScores(); SceneContext.SetState(SceneContext.Scene.Over); }
//----------------------------------------------------------------------------- // Game::Draw() // This function is called once per frame // Use this for draw graphics to the screen. // Only do rendering here //----------------------------------------------------------------------------- public override void Draw() { SceneContext.GetState().Draw(); }
//----------------------------------------------------------------------------- // Game::Update() // Called once per frame, update data, tranformations, etc // Use this function to control process order // Input, AI, Physics, Animation, and Graphics //----------------------------------------------------------------------------- public override void Update() { GlobalTimer.Update(this.GetTime()); SceneContext.GetState().Update(this.GetTime()); }
public override void Execute() { GameObject pA = (GameObject)this.pAlien; GameObject pB = (GameObject)Iterator.GetParent(pA); float x = this.pAlien.x; float y = this.pAlien.y; AlienGrid pGrid = (AlienGrid)this.pAlien.pParent.pParent; pGrid.nNumActive--; pA.Remove(); // TODO: Need a better way... if (privCheckParent(pB) == true) { GameObject pC = (GameObject)Iterator.GetParent(pB); pB.Remove(); if (privCheckParent(pC) == true) { pC.Remove(); } } Missile pMissile = (Missile)this.pGameObj; Player pPlayer = pMissile.pPlayer; // Font.Name pFontName = Font.Name.Uninitialized; if (this.pGameObj is MissileCategory) { pPlayer.nPoints += this.pAlien.GetPoints(); Font pScore = null; if (pPlayer.n == 1) { pScore = FontMan.Find(Font.Name.Score1Value); pFontName = Font.Name.Score1Value; } if (pPlayer.n == 2) { pScore = FontMan.Find(Font.Name.Score2Value); pFontName = Font.Name.Score2Value; } pScore.Set(pFontName, pPlayer.nPoints.ToString(), Glyph.Name.Consolas20pt, pScore.pFontSprite.x, pScore.pFontSprite.y); } //--------------------------------------------------------------------------------------------------------- // Sound //--------------------------------------------------------------------------------------------------------- SoundMan.PlaySound(Sound.Name.InvaderKilled); TimeEvent pTimeEvent = TimerMan.Find(TimeEvent.Name.ScenePlaySound); pTimeEvent.deltaTime -= 0.01f; //--------------------------------------------------------------------------------------------------------- // Explosion //--------------------------------------------------------------------------------------------------------- Explosion explosion = new Explosion(GameObject.Name.Explosion, GameSprite.Name.Explosion, x, y); SpriteBatch pSB_Aliens = SpriteBatchMan.Find(SpriteBatch.Name.Aliens); explosion.ActivateGameSprite(pSB_Aliens); GameObjectMan.Attach(explosion); TimerMan.Add(TimeEvent.Name.RemoveExplosion, new RemoveExplosionCommand(explosion), 0.25f); //--------------------------------------------------------------------------------------------------------- // Scene Transition //--------------------------------------------------------------------------------------------------------- if (pGrid.nNumActive == 0 && pPlayer.nCurrLevel == 1) { PlayerMan.WriteHighScores(); pPlayer.nCurrLevel++; SceneContext.GetState().Initialize(); if (SceneContext.bMultiplayer) { SceneContext.SetState(SceneContext.Scene.MultiPlay); } else { SceneContext.SetState(SceneContext.Scene.SinglePlay); } } else if (pGrid.nNumActive == 0 && pPlayer.nCurrLevel == 2) { PlayerMan.WriteHighScores(); SceneContext.SetState(SceneContext.Scene.Credits); } }
//----------------------------------------------------------------------------- // Game::LoadContent() // Allows you to load all content needed for your engine, // such as objects, graphics, etc. //----------------------------------------------------------------------------- public override void LoadContent() { ScreenWidth = this.GetScreenWidth(); ScreenHeight = this.GetScreenHeight(); //--------------------------------------------------------------------------------------------------------- // Init Managers //--------------------------------------------------------------------------------------------------------- //Constant Managers TextureManager.Create(1, 1); ImageManager.Create(5, 2); SoundManager.Create(3, 1); GameSpriteManager.Create(4, 2); BoxSpriteManager.Create(3, 1); CollisionStateManager.Create(); GlyphManager.Create(3, 1); Simulation.Create(); RandomManager.Create(); BombManager.Create(); ShipManager.Create(); //State-unique Managers SpriteBatchManager.Create(); GameObjectManager.Create(); InputManager.Create(); FontManager.Create(); TimerManager.Create(); CollisionPairManager.Create(); //ProxySpriteManager.Create(10, 1);//not in use currently //--------------------------------------------------------------------------------------------------------- // Load the Textures //--------------------------------------------------------------------------------------------------------- TextureManager.Add(Texture.Name.SpaceInvaders, "SpaceInvaders.tga"); //--------------------------------------------------------------------------------------------------------- // Load Sounds //--------------------------------------------------------------------------------------------------------- SoundManager.Add(Sound.Name.Invader1, "fastinvader1.wav"); SoundManager.Add(Sound.Name.Invader2, "fastinvader2.wav"); SoundManager.Add(Sound.Name.Invader3, "fastinvader3.wav"); SoundManager.Add(Sound.Name.Invader4, "fastinvader4.wav"); SoundManager.Add(Sound.Name.Shoot, "invaderkilled.wav"); SoundManager.Add(Sound.Name.DeadAlien, "shoot.wav"); SoundManager.Add(Sound.Name.UFO, "ufo_highpitch.wav"); SoundManager.Add(Sound.Name.UFOExplosion, "ufo_lowpitch.wav"); SoundManager.Add(Sound.Name.Explosion, "explosion.wav"); //--------------------------------------------------------------------------------------------------------- // Create Images //--------------------------------------------------------------------------------------------------------- // --- aliens --- ImageManager.Add(Image.Name.OctopusA, Texture.Name.SpaceInvaders, 3, 3, 12, 8); ImageManager.Add(Image.Name.OctopusB, Texture.Name.SpaceInvaders, 18, 3, 12, 8); ImageManager.Add(Image.Name.AlienA, Texture.Name.SpaceInvaders, 33, 3, 11, 8); ImageManager.Add(Image.Name.AlienB, Texture.Name.SpaceInvaders, 47, 3, 11, 8); ImageManager.Add(Image.Name.SquidA, Texture.Name.SpaceInvaders, 61, 3, 8, 8); ImageManager.Add(Image.Name.SquidB, Texture.Name.SpaceInvaders, 72, 3, 8, 8); ImageManager.Add(Image.Name.Saucer, Texture.Name.SpaceInvaders, 99, 3, 16, 8); ImageManager.Add(Image.Name.Missile, Texture.Name.SpaceInvaders, 3, 29, 1, 4); ImageManager.Add(Image.Name.Ship, Texture.Name.SpaceInvaders, 3, 14, 13, 8); ImageManager.Add(Image.Name.AlienExplosion, Texture.Name.SpaceInvaders, 83, 3, 13, 8); ImageManager.Add(Image.Name.SaucerExplosion, Texture.Name.SpaceInvaders, 118, 3, 21, 8); ImageManager.Add(Image.Name.ShipExplosionA, Texture.Name.SpaceInvaders, 19, 14, 16, 8); ImageManager.Add(Image.Name.ShipExplosionB, Texture.Name.SpaceInvaders, 38, 14, 16, 8); ImageManager.Add(Image.Name.MissileExplosion, Texture.Name.SpaceInvaders, 7, 25, 8, 8); ImageManager.Add(Image.Name.BombExplosion, Texture.Name.SpaceInvaders, 86, 25, 6, 8); ImageManager.Add(Image.Name.BombDagger, Texture.Name.SpaceInvaders, 42, 27, 3, 6); ImageManager.Add(Image.Name.BombZigZag, Texture.Name.SpaceInvaders, 18, 26, 3, 7); ImageManager.Add(Image.Name.BombStraight, Texture.Name.SpaceInvaders, 65, 26, 3, 7); ImageManager.Add(Image.Name.ShieldBrick, Texture.Name.SpaceInvaders, 120, 35, 4, 2); ImageManager.Add(Image.Name.ShieldBrick_LeftTop0, Texture.Name.SpaceInvaders, 115, 30, 4, 2); ImageManager.Add(Image.Name.ShieldBrick_LeftTop1, Texture.Name.SpaceInvaders, 116, 31, 4, 2); ImageManager.Add(Image.Name.ShieldBrick_LeftBottom, Texture.Name.SpaceInvaders, 119, 43, 4, 2); ImageManager.Add(Image.Name.ShieldBrick_RightTop0, Texture.Name.SpaceInvaders, 132, 31, 4, 2); ImageManager.Add(Image.Name.ShieldBrick_RightTop1, Texture.Name.SpaceInvaders, 130, 31, 4, 2); ImageManager.Add(Image.Name.ShieldBrick_RightBottom, Texture.Name.SpaceInvaders, 126, 43, 4, 2); //--------------------------------------------------------------------------------------------------------- // Create Glyphs //--------------------------------------------------------------------------------------------------------- GlyphManager.Add(Glyph.Name.Space, 32, Texture.Name.SpaceInvaders, 99, 56, 5, 7); GlyphManager.Add(Glyph.Name.Asterisk, 42, Texture.Name.SpaceInvaders, 115, 56, 5, 7); GlyphManager.Add(Glyph.Name.Hyphen, 45, Texture.Name.SpaceInvaders, 131, 56, 5, 7); GlyphManager.Add(Glyph.Name.Zero, 48, Texture.Name.SpaceInvaders, 3, 56, 5, 7); GlyphManager.Add(Glyph.Name.One, 49, Texture.Name.SpaceInvaders, 11, 56, 5, 7); GlyphManager.Add(Glyph.Name.Two, 50, Texture.Name.SpaceInvaders, 19, 56, 5, 7); GlyphManager.Add(Glyph.Name.Three, 51, Texture.Name.SpaceInvaders, 27, 56, 5, 7); GlyphManager.Add(Glyph.Name.Four, 52, Texture.Name.SpaceInvaders, 35, 56, 5, 7); GlyphManager.Add(Glyph.Name.Five, 53, Texture.Name.SpaceInvaders, 43, 56, 5, 7); GlyphManager.Add(Glyph.Name.Six, 54, Texture.Name.SpaceInvaders, 51, 56, 5, 7); GlyphManager.Add(Glyph.Name.Seven, 55, Texture.Name.SpaceInvaders, 59, 56, 5, 7); GlyphManager.Add(Glyph.Name.Eight, 56, Texture.Name.SpaceInvaders, 67, 56, 5, 7); GlyphManager.Add(Glyph.Name.Nine, 57, Texture.Name.SpaceInvaders, 75, 56, 5, 7); GlyphManager.Add(Glyph.Name.LessThan, 60, Texture.Name.SpaceInvaders, 83, 56, 5, 7); GlyphManager.Add(Glyph.Name.Equals, 61, Texture.Name.SpaceInvaders, 107, 56, 5, 7); GlyphManager.Add(Glyph.Name.GreaterThan, 62, Texture.Name.SpaceInvaders, 91, 56, 5, 7); GlyphManager.Add(Glyph.Name.Question, 63, Texture.Name.SpaceInvaders, 123, 56, 5, 7); GlyphManager.Add(Glyph.Name.A, 65, Texture.Name.SpaceInvaders, 3, 36, 5, 7); GlyphManager.Add(Glyph.Name.B, 66, Texture.Name.SpaceInvaders, 11, 36, 5, 7); GlyphManager.Add(Glyph.Name.C, 67, Texture.Name.SpaceInvaders, 19, 36, 5, 7); GlyphManager.Add(Glyph.Name.D, 68, Texture.Name.SpaceInvaders, 27, 36, 5, 7); GlyphManager.Add(Glyph.Name.E, 69, Texture.Name.SpaceInvaders, 35, 36, 5, 7); GlyphManager.Add(Glyph.Name.F, 70, Texture.Name.SpaceInvaders, 43, 36, 5, 7); GlyphManager.Add(Glyph.Name.G, 71, Texture.Name.SpaceInvaders, 51, 36, 5, 7); GlyphManager.Add(Glyph.Name.H, 72, Texture.Name.SpaceInvaders, 59, 36, 5, 7); GlyphManager.Add(Glyph.Name.I, 73, Texture.Name.SpaceInvaders, 67, 36, 5, 7); GlyphManager.Add(Glyph.Name.J, 74, Texture.Name.SpaceInvaders, 75, 36, 5, 7); GlyphManager.Add(Glyph.Name.K, 75, Texture.Name.SpaceInvaders, 83, 36, 5, 7); GlyphManager.Add(Glyph.Name.L, 76, Texture.Name.SpaceInvaders, 91, 36, 5, 7); GlyphManager.Add(Glyph.Name.M, 77, Texture.Name.SpaceInvaders, 99, 36, 5, 7); GlyphManager.Add(Glyph.Name.N, 78, Texture.Name.SpaceInvaders, 3, 46, 5, 7); GlyphManager.Add(Glyph.Name.O, 79, Texture.Name.SpaceInvaders, 11, 46, 5, 7); GlyphManager.Add(Glyph.Name.P, 80, Texture.Name.SpaceInvaders, 19, 46, 5, 7); GlyphManager.Add(Glyph.Name.Q, 81, Texture.Name.SpaceInvaders, 27, 46, 5, 7); GlyphManager.Add(Glyph.Name.R, 82, Texture.Name.SpaceInvaders, 35, 46, 5, 7); GlyphManager.Add(Glyph.Name.S, 83, Texture.Name.SpaceInvaders, 43, 46, 5, 7); GlyphManager.Add(Glyph.Name.T, 84, Texture.Name.SpaceInvaders, 51, 46, 5, 7); GlyphManager.Add(Glyph.Name.U, 85, Texture.Name.SpaceInvaders, 59, 46, 5, 7); GlyphManager.Add(Glyph.Name.V, 86, Texture.Name.SpaceInvaders, 67, 46, 5, 7); GlyphManager.Add(Glyph.Name.W, 87, Texture.Name.SpaceInvaders, 75, 46, 5, 7); GlyphManager.Add(Glyph.Name.X, 88, Texture.Name.SpaceInvaders, 83, 46, 5, 7); GlyphManager.Add(Glyph.Name.Y, 89, Texture.Name.SpaceInvaders, 91, 46, 5, 7); GlyphManager.Add(Glyph.Name.Z, 90, Texture.Name.SpaceInvaders, 99, 46, 5, 7); //--------------------------------------------------------------------------------------------------------- // Create Sprites //--------------------------------------------------------------------------------------------------------- // --- aliens --- GameSpriteManager.Add(GameSprite.Name.PurpleOctopus, Image.Name.OctopusA, 50, 300, 49, 33); GameSpriteManager.Add(GameSprite.Name.BlueCrab, Image.Name.AlienB, 200, 100, 45, 33); GameSpriteManager.Add(GameSprite.Name.GreenSquid, Image.Name.SquidA, 200, 300, 33, 33); GameSpriteManager.Add(GameSprite.Name.OrangeSaucer, Image.Name.Saucer, 50, 550, 59, 33, new Azul.Color(1.0f, 0.0f, 0.0f, 1.0f)); //-----Missile---- GameSpriteManager.Add(GameSprite.Name.Missile, Image.Name.Missile, 50, 50, 3, 15); //----Player Ship---- GameSpriteManager.Add(GameSprite.Name.Ship, Image.Name.Ship, 500, 100, 50, 30, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); //---Explosions--- GameSpriteManager.Add(GameSprite.Name.AlienExplosion, Image.Name.AlienExplosion, 50, 50, 33, 33); GameSpriteManager.Add(GameSprite.Name.ShipExplosion, Image.Name.ShipExplosionA, 50, 50, 55, 35); GameSpriteManager.Add(GameSprite.Name.SaucerExplosion, Image.Name.SaucerExplosion, 50, 50, 45, 35, new Azul.Color(1.0f, 0.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.BombExplosion, Image.Name.BombExplosion, 50, 50, 25, 25); GameSpriteManager.Add(GameSprite.Name.MissileExplosionRed, Image.Name.MissileExplosion, 50, 50, 20, 20, new Azul.Color(1.0f, 0.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.MissileExplosionGreen, Image.Name.MissileExplosion, 50, 50, 20, 20, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.MissileExplosionWhite, Image.Name.MissileExplosion, 50, 50, 20, 20); //----Bombs---- GameSpriteManager.Add(GameSprite.Name.BombDagger, Image.Name.BombDagger, 50, 50, 10, 25); GameSpriteManager.Add(GameSprite.Name.BombZigZag, Image.Name.BombZigZag, 50, 50, 10, 25); GameSpriteManager.Add(GameSprite.Name.BombStraight, Image.Name.BombStraight, 50, 50, 10, 25); //----Shield---- GameSpriteManager.Add(GameSprite.Name.ShieldBrick, Image.Name.ShieldBrick, 50, 25, 12, 7, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.ShieldBrick_LeftTop0, Image.Name.ShieldBrick_LeftTop0, 50, 25, 12, 7, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.ShieldBrick_LeftTop1, Image.Name.ShieldBrick_LeftTop1, 50, 25, 12, 7, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.ShieldBrick_LeftBottom, Image.Name.ShieldBrick_LeftBottom, 50, 25, 12, 7, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.ShieldBrick_RightTop0, Image.Name.ShieldBrick_RightTop0, 50, 25, 12, 7, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.ShieldBrick_RightTop1, Image.Name.ShieldBrick_RightTop1, 50, 25, 12, 7, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); GameSpriteManager.Add(GameSprite.Name.ShieldBrick_RightBottom, Image.Name.ShieldBrick_RightBottom, 50, 25, 12, 7, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); //----Ground---- GameSpriteManager.Add(GameSprite.Name.Ground, Image.Name.ShieldBrick, 50, 50, SpaceInvaders.ScreenWidth - 10, 5, new Azul.Color(0.0f, 1.0f, 0.0f, 1.0f)); //-------------------------------------------------------------------------- //Create Scenes //-------------------------------------------------------------------------- pHiScore = 0; pPlayer1Score = 0; pPlayer2Score = 0; pSceneContext = new SceneContext(); }