public void Dispose(Scene scene) { scene.RemoveChild(_sprite, true); scene.RemoveChild(_fireDeathSprite, true); _textureInfo.Dispose(); _fireDeathTextureInfo.Dispose(); }
override public void Dispose(Scene scene) { scene.RemoveChild(meteorSprite, true); scene.RemoveChild(lineSprite, true); lineTextureInfo.Dispose(); meteorTextureInfo.Dispose(); }
override public void Dispose(Scene scene) { scene.RemoveChild(geiserSpriteSheet, true); scene.RemoveChild(spikeSprite, true); scene.RemoveChild(geiserSprite, true); geiserSheetTextureInfo.Dispose(); geiserTextureInfo.Dispose(); spikeTextureInfo.Dispose(); }
override public void Dispose(Scene scene) { trap.Dispose(scene); pit.Dispose(scene); scene.RemoveChild(springSprite, true); scene.RemoveChild(springSprite2, true); scene.RemoveChild(springTopSprite, true); springTextureInfo.Dispose(); springTopTextureInfo.Dispose(); }
override public void Dispose(Scene scene) { trap.Dispose(scene); scene.RemoveChild(plankSprite, true); scene.RemoveChild(ropeSprite1, true); scene.RemoveChild(ropeSprite2, true); scene.RemoveChild(ropeSprite3, true); scene.RemoveChild(ropeSprite4, true); textureRope.Dispose(); texturePlank.Dispose(); }
override public void Dispose(Scene scene) { _trap.Dispose(scene); _pit.Dispose(scene); scene.RemoveChild(_sprite, true); _textureInfo.Dispose(); }
override public void Dispose(Scene scene) { for (int i = 0; i < numberOfObstacles; i++) { //scene.RemoveChild(pivSprite[i], true); scene.RemoveChild(spinSprite[i], true); } textureSpinObstacle.Dispose(); textureSpinPiv.Dispose(); }
private void UpdateSprite(Scene scene) { _fading = false; _screen = _nextScreen; scene.RemoveChild(_bgSprite, false); switch (_screen) { case Screens.Splash: _bgTextureInfo = new TextureInfo("/Application/textures/splash.png"); _bgSprite = new SpriteUV(_bgTextureInfo); _bgSprite.Scale = new Vector2(960.0f, 544.0f); _bgSprite.Color.A = 0.0f; scene.AddChild(_bgSprite); break; case Screens.Menu: _bgTextureInfo = new TextureInfo("/Application/textures/menu.png"); _bgSprite = new SpriteUV(_bgTextureInfo); _bgSprite.Scale = new Vector2(960.0f, 544.0f); _bgSprite.Color.A = 0.0f; scene.AddChild(_bgSprite); break; case Screens.Game: _bgTextureInfo = new TextureInfo("/Application/textures/game.png"); _bgSprite = new SpriteUV(_bgTextureInfo); _bgSprite.Scale = new Vector2(960.0f, 544.0f); _bgSprite.Color.A = 0.0f; scene.AddChild(_bgSprite); AppMain.SetUISystem("game"); break; case Screens.GameOver: _bgTextureInfo = new TextureInfo("/Application/textures/gameOver.png"); _bgSprite = new SpriteUV(_bgTextureInfo); _bgSprite.Scale = new Vector2(960.0f, 544.0f); _bgSprite.Color.A = 0.0f; scene.AddChild(_bgSprite); AppMain.SetUISystem("highscores"); break; case Screens.HighScores: _bgTextureInfo = new TextureInfo("/Application/textures/highscores.png"); _bgSprite = new SpriteUV(_bgTextureInfo); _bgSprite.Scale = new Vector2(960.0f, 544.0f); _bgSprite.Color.A = 0.0f; scene.AddChild(_bgSprite); AppMain.SetUISystem("highscores"); break; } }
public void UpdateWalls() { //Moves the wall overlay so that it's a constant scrolling image // wallSprite.Position = new Vector2(wallSprite.Position.X-1.5f, wallSprite.Position.Y); // wallSprite2.Position = new Vector2(wallSprite2.Position.X-1.5f, wallSprite2.Position.Y); // entrSprite.Position = new Vector2(entrSprite.Position.X-1.5f, entrSprite.Position.Y); //Resets the position once off screen if (wallSprite.Position.X + wallTextureInfo.TextureSizef.X <= volcSprite.Position.X) { wallSprite.Position = new Vector2(wallSprite2.Position.X + wallTextureInfo.TextureSizef.X, 0.0f); } if (wallSprite2.Position.X + wallTextureInfo.TextureSizef.X <= volcSprite.Position.X) { wallSprite2.Position = new Vector2(wallSprite.Position.X + wallTextureInfo.TextureSizef.X, 0.0f); } if (entrSprite.Position.X < -width) { tScene.RemoveChild(entrSprite, true); } }
public void DisableTutorials(Scene scene) { _ready = false; _tutorialsEnabled = !_tutorialsEnabled; scene.RemoveChild(_popUpSprite, false); if (_tutorialsEnabled) { _popUpTextureInfo = new TextureInfo("/Application/textures/tutorial/gamePopUpTutorialsOn.png"); _popUpSprite = new SpriteUV(_popUpTextureInfo); _popUpSprite.Scale = new Vector2(800.0f, 500.0f); _popUpSprite.Position = new Vector2(80.0f, 22.0f); scene.AddChild(_popUpSprite); } else { _popUpTextureInfo = new TextureInfo("/Application/textures/tutorial/gamePopUpTutorialsOff.png"); _popUpSprite = new SpriteUV(_popUpTextureInfo); _popUpSprite.Scale = new Vector2(800.0f, 500.0f); _popUpSprite.Position = new Vector2(80.0f, 22.0f); scene.AddChild(_popUpSprite); } }
public void Dispose(Scene scene) { scene.RemoveChild(volcSprite, true); scene.RemoveChild(smogSprite, true); scene.RemoveChild(smogSprite2, true); scene.RemoveChild(wallSprite, true); scene.RemoveChild(wallSprite2, true); scene.RemoveChild(entrSprite, true); scene.RemoveChild(floorOverlay, true); scene.RemoveChild(floor2Overlay, true); scene.RemoveChild(floorSprite, true); scene.RemoveChild(floor2Sprite, true); scene.RemoveChild(underFloorSprite, true); scene.RemoveChild(underFloor2Sprite, true); scene.RemoveChild(floorLavaOverlay, true); scene.RemoveChild(floorLava2Overlay, true); volcTextureInfo.Dispose(); wallTextureInfo.Dispose(); wall2TextureInfo.Dispose(); smogTextureInfo.Dispose(); smog2TextureInfo.Dispose(); underFloorTextureInfo.Dispose(); floorTextureInfo.Dispose(); floorOTextureInfo.Dispose(); floorLavaTextureInfo.Dispose(); }
public void ClosePopUp(Scene scene) { _ready = false; if (_tutorialsEnabled) { scene.RemoveChild(_popUpSprite, false); // Load next popup switch (_popUp) { case PopUp.HowToPlay: _popUpTextureInfo.Dispose(); _popUpTextureInfo = new TextureInfo("/Application/textures/tutorial/springPopUp.png"); _popUpSprite = new SpriteUV(_popUpTextureInfo); _popUpSprite.Scale = new Vector2(800.0f, 500.0f); _popUpSprite.Position = new Vector2(80.0f, 22.0f); scene.AddChild(_popUpSprite); _popUp = PopUp.Spring; break; case PopUp.Spring: _popUpTextureInfo.Dispose(); _popUpTextureInfo = new TextureInfo("/Application/textures/tutorial/seaSawPopUp.png"); _popUpSprite = new SpriteUV(_popUpTextureInfo); _popUpSprite.Scale = new Vector2(800.0f, 500.0f); _popUpSprite.Position = new Vector2(80.0f, 22.0f); scene.AddChild(_popUpSprite); _popUp = PopUp.Seasaw; break; case PopUp.Seasaw: _popUpTextureInfo.Dispose(); _popUpTextureInfo = new TextureInfo("/Application/textures/tutorial/spinningPopUp.png"); _popUpSprite = new SpriteUV(_popUpTextureInfo); _popUpSprite.Scale = new Vector2(800.0f, 500.0f); _popUpSprite.Position = new Vector2(80.0f, 22.0f); scene.AddChild(_popUpSprite); _popUp = PopUp.Spinning; break; case PopUp.Spinning: _popUpTextureInfo.Dispose(); _popUpTextureInfo = new TextureInfo("/Application/textures/tutorial/geiserPopUp.png"); _popUpSprite = new SpriteUV(_popUpTextureInfo); _popUpSprite.Scale = new Vector2(800.0f, 500.0f); _popUpSprite.Position = new Vector2(80.0f, 22.0f); scene.AddChild(_popUpSprite); _popUp = PopUp.Geiser; break; case PopUp.Geiser: _popUpTextureInfo.Dispose(); _popUpTextureInfo = new TextureInfo("/Application/textures/tutorial/tntPopUp.png"); _popUpSprite = new SpriteUV(_popUpTextureInfo); _popUpSprite.Scale = new Vector2(800.0f, 500.0f); _popUpSprite.Position = new Vector2(80.0f, 22.0f); scene.AddChild(_popUpSprite); _popUp = PopUp.TNT; break; case PopUp.TNT: // Last tutorial = remove sprite _popUpActive = false; scene.RemoveChild(_popUpSprite, false); break; } } else // Tutorials have been disabled, don't display them { _popUpActive = false; scene.RemoveChild(_popUpSprite, false); } }
public void Dispose(Scene scene) { scene.RemoveChild(_popUpSprite, true); _popUpTextureInfo.Dispose(); }
override public void Dispose(Scene scene) { scene.RemoveChild(doorSprite, true); scene.RemoveChild(doorSprite2, true); doorTextureInfo.Dispose(); }