public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/mundosmith/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/mundosmith/scenefile.scnx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/mundosmith/limitesmundo.shcx", ContentManagerName)) { } LimitesMundo = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/mundosmith/limitesmundo.shcx", ContentManagerName); Fondo = SceneFile.Sprites.FindByName("ship painting1"); SmithInstance = new TesisEconoFight.Entities.Smith(ContentManagerName, false); SmithInstance.Name = "SmithInstance"; PauseTextInstance = new TesisEconoFight.Entities.PauseText(ContentManagerName, false); PauseTextInstance.Name = "PauseTextInstance"; P2WinTextInstance = new TesisEconoFight.Entities.P2WinText(ContentManagerName, false); P2WinTextInstance.Name = "P2WinTextInstance"; P1WinTextInstance = new TesisEconoFight.Entities.P1WinText(ContentManagerName, false); P1WinTextInstance.Name = "P1WinTextInstance"; DoubleKOTextInstance = new TesisEconoFight.Entities.DoubleKOText(ContentManagerName, false); DoubleKOTextInstance.Name = "DoubleKOTextInstance"; ListaJugadores = new FlatRedBall.Math.PositionedObjectList<TesisEconoFight.Entities.Player>(); ListaJugadores.Name = "ListaJugadores"; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/gameover/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/gameover/scenefile.scnx", ContentManagerName); PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBallServices.IsLoaded <FlatRedBall.Scene>(@"content/screens/splashscreen/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBallServices.Load <FlatRedBall.Scene>(@"content/screens/splashscreen/scenefile.scnx", ContentManagerName); SpriteObject = SceneFile.Sprites.FindByName("frblogo5121"); this.NextScreen = typeof(LudumDare29.Screens.MenuScreen).FullName; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/menuglosario/altsglosario.shcx", ContentManagerName)) { } AltsGlosario = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/menuglosario/altsglosario.shcx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/menuglosario/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/menuglosario/scenefile.scnx", ContentManagerName); Cursores = new FlatRedBall.Math.PositionedObjectList<TesisEconoFight.Entities.Kursor>(); Cursores.Name = "Cursores"; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/menuprincipal/alternativas.shcx", ContentManagerName)) { } Alternativas = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/menuprincipal/alternativas.shcx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/menuprincipal/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/menuprincipal/scenefile.scnx", ContentManagerName); KursorInstance = new TesisEconoFight.Entities.Kursor(ContentManagerName, false); KursorInstance.Name = "KursorInstance"; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); Boundary = BoundaryShapeCollection; SkySceneInstance = SkySceneFile; for (int i = 0; i < SkySceneInstance.Texts.Count; i++) { SkySceneInstance.Texts[i].AdjustPositionForPixelPerfectDrawing = true; } BirdInstance = new FlatRedBird.Entities.Bird(ContentManagerName, false); BirdInstance.Name = "BirdInstance"; ObstacleList = new PositionedObjectList<FlatRedBird.Entities.Obstacle>(); GroundInstance = new FlatRedBird.Entities.Ground(ContentManagerName, false); GroundInstance.Name = "GroundInstance"; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Destroy() { // Generated Destroy ObstacleFactory.Destroy(); if (this.UnloadsContentManagerWhenDestroyed && ContentManagerName != "Global") { BoundaryShapeCollection.RemoveFromManagers(ContentManagerName != "Global"); } else { BoundaryShapeCollection.RemoveFromManagers(false); } if (this.UnloadsContentManagerWhenDestroyed && ContentManagerName != "Global") { BoundaryShapeCollection = null; } else { BoundaryShapeCollection.MakeOneWay(); } if (this.UnloadsContentManagerWhenDestroyed && ContentManagerName != "Global") { SkySceneFile.RemoveFromManagers(ContentManagerName != "Global"); } else { SkySceneFile.RemoveFromManagers(false); } if (this.UnloadsContentManagerWhenDestroyed && ContentManagerName != "Global") { SkySceneFile = null; } else { SkySceneFile.MakeOneWay(); } if (BirdInstance != null) { BirdInstance.Destroy(); BirdInstance.Detach(); } for (int i = ObstacleList.Count - 1; i > -1; i--) { ObstacleList[i].Destroy(); } if (Boundary != null) { Boundary.RemoveFromManagers(ContentManagerName != "Global"); } if (GroundInstance != null) { GroundInstance.Destroy(); GroundInstance.Detach(); } if (SkySceneInstance != null) { SkySceneInstance.RemoveFromManagers(ContentManagerName != "Global"); } base.Destroy(); CustomDestroy(); }
public static void LoadStaticContent(string contentManagerName) { if (string.IsNullOrEmpty(contentManagerName)) { throw new ArgumentException("contentManagerName cannot be empty or null"); } #if DEBUG if (contentManagerName == FlatRedBallServices.GlobalContentManager) { HasBeenLoadedWithGlobalContentManager = true; } else if (HasBeenLoadedWithGlobalContentManager) { throw new Exception("This type has been loaded with a Global content manager, then loaded with a non-global. This can lead to a lot of bugs"); } #endif if (!FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/gamescreen/boundaryshapecollection.shcx", contentManagerName)) { } BoundaryShapeCollection = FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/gamescreen/boundaryshapecollection.shcx", contentManagerName); if (!FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/gamescreen/skyscenefile.scnx", contentManagerName)) { } SkySceneFile = FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/gamescreen/skyscenefile.scnx", contentManagerName); FlatRedBird.Entities.Bird.LoadStaticContent(contentManagerName); FlatRedBird.Entities.Ground.LoadStaticContent(contentManagerName); CustomLoadStaticContent(contentManagerName); }
protected virtual void InitializeEntity(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); EntireScene = GroundSceneFile.Clone(); for (int i = 0; i < EntireScene.Texts.Count; i++) { EntireScene.Texts[i].AdjustPositionForPixelPerfectDrawing = true; } PostInitialize(); if (addToManagers) { AddToManagers(null); } }
public static void UnloadStaticContent() { if (LoadedContentManagers.Count != 0) { LoadedContentManagers.RemoveAt(0); mRegisteredUnloads.RemoveAt(0); } if (LoadedContentManagers.Count == 0) { if (GroundSceneFile != null) { GroundSceneFile.RemoveFromManagers(ContentManagerName != "Global"); GroundSceneFile= null; } } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/tutorialsmith/animacionmundo.achx", ContentManagerName)) { } AnimacionMundo = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/tutorialsmith/animacionmundo.achx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/tutorialsmith/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/tutorialsmith/scenefile.scnx", ContentManagerName); Pantalla = SceneFile.Sprites.FindByName("pantalla tutorial smith1"); PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public static void LoadStaticContent(string contentManagerName) { if (string.IsNullOrEmpty(contentManagerName)) { throw new ArgumentException("contentManagerName cannot be empty or null"); } ContentManagerName = contentManagerName; #if DEBUG if (contentManagerName == FlatRedBallServices.GlobalContentManager) { HasBeenLoadedWithGlobalContentManager = true; } else if (HasBeenLoadedWithGlobalContentManager) { throw new Exception("This type has been loaded with a Global content manager, then loaded with a non-global. This can lead to a lot of bugs"); } #endif bool registerUnload = false; if (LoadedContentManagers.Contains(contentManagerName) == false) { LoadedContentManagers.Add(contentManagerName); lock (mLockObject) { if (!mRegisteredUnloads.Contains(ContentManagerName) && ContentManagerName != FlatRedBallServices.GlobalContentManager) { FlatRedBallServices.GetContentManagerByName(ContentManagerName).AddUnloadMethod("ObstacleStaticUnload", UnloadStaticContent); mRegisteredUnloads.Add(ContentManagerName); } } if (!FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/entities/obstacle/shapecollectionfile.shcx", ContentManagerName)) { registerUnload = true; } ShapeCollectionFile = FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/entities/obstacle/shapecollectionfile.shcx", ContentManagerName); if (!FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/entities/obstacle/passthroughshapecollectionfile.shcx", ContentManagerName)) { registerUnload = true; } PassThroughShapeCollectionFile = FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/entities/obstacle/passthroughshapecollectionfile.shcx", ContentManagerName); if (!FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/entities/obstacle/scenefile.scnx", ContentManagerName)) { registerUnload = true; } SceneFile = FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/entities/obstacle/scenefile.scnx", ContentManagerName); } if (registerUnload && ContentManagerName != FlatRedBallServices.GlobalContentManager) { lock (mLockObject) { if (!mRegisteredUnloads.Contains(ContentManagerName) && ContentManagerName != FlatRedBallServices.GlobalContentManager) { FlatRedBallServices.GetContentManagerByName(ContentManagerName).AddUnloadMethod("ObstacleStaticUnload", UnloadStaticContent); mRegisteredUnloads.Add(ContentManagerName); } } } CustomLoadStaticContent(contentManagerName); }
public static void LoadStaticContent(string contentManagerName) { if (string.IsNullOrEmpty(contentManagerName)) { throw new ArgumentException("contentManagerName cannot be empty or null"); } // Set to use global content contentManagerName = FlatRedBallServices.GlobalContentManager; ContentManagerName = FlatRedBall.FlatRedBallServices.GlobalContentManager; #if DEBUG if (contentManagerName == FlatRedBallServices.GlobalContentManager) { HasBeenLoadedWithGlobalContentManager = true; } else if (HasBeenLoadedWithGlobalContentManager) { throw new Exception("This type has been loaded with a Global content manager, then loaded with a non-global. This can lead to a lot of bugs"); } #endif if (LoadedContentManagers.Contains(contentManagerName) == false) { LoadedContentManagers.Add(contentManagerName); lock (mLockObject) { if (!mRegisteredUnloads.Contains(ContentManagerName) && ContentManagerName != FlatRedBallServices.GlobalContentManager) { FlatRedBallServices.GetContentManagerByName(ContentManagerName).AddUnloadMethod("InteractiveConsoleStaticUnload", UnloadStaticContent); mRegisteredUnloads.Add(ContentManagerName); } } SceneFile = FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/entities/interactiveconsole/scenefile.scnx", ContentManagerName); } CustomLoadStaticContent(contentManagerName); }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/stageselect/seleccionstage.shcx", ContentManagerName)) { } SeleccionStage = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/stageselect/seleccionstage.shcx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/stageselect/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/stageselect/scenefile.scnx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/stageselect/animarseleccion.achx", ContentManagerName)) { } AnimarSeleccion = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/stageselect/animarseleccion.achx", ContentManagerName); Cursores = new FlatRedBall.Math.PositionedObjectList<TesisEconoFight.Entities.Kursor>(); Cursores.Name = "Cursores"; Sprite = SceneFile.Sprites.FindByName("universitätfreiburg1"); PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public static void UnloadStaticContent() { if (LoadedContentManagers.Count != 0) { LoadedContentManagers.RemoveAt(0); mRegisteredUnloads.RemoveAt(0); } if (LoadedContentManagers.Count == 0) { if (ShapeCollectionFile != null) { ShapeCollectionFile.RemoveFromManagers(ContentManagerName != "Global"); ShapeCollectionFile= null; } if (PassThroughShapeCollectionFile != null) { PassThroughShapeCollectionFile.RemoveFromManagers(ContentManagerName != "Global"); PassThroughShapeCollectionFile= null; } if (SceneFile != null) { SceneFile.RemoveFromManagers(ContentManagerName != "Global"); SceneFile= null; } } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/glosariosistemasjuego/opciones.shcx", ContentManagerName)) { } Opciones = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/glosariosistemasjuego/opciones.shcx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/glosariosistemasjuego/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/glosariosistemasjuego/scenefile.scnx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/glosariosistemasjuego/animacionpantalla.achx", ContentManagerName)) { } AnimacionPantalla = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/glosariosistemasjuego/animacionpantalla.achx", ContentManagerName); KursorInstance = new TesisEconoFight.Entities.Kursor(ContentManagerName, false); KursorInstance.Name = "KursorInstance"; Pantalla = SceneFile.Sprites.FindByName("glosario sistema de juegos 11"); PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBallServices.IsLoaded<Scene>(@"content/screens/mainmenu/mybackground.scnx", ContentManagerName)) { } MyBackground = FlatRedBallServices.Load<Scene>(@"content/screens/mainmenu/mybackground.scnx", ContentManagerName); beep = FlatRedBallServices.Load<SoundEffect>(@"content/screens/mainmenu/beep", ContentManagerName); scene = MyBackground; StartGameButton = new BeefBall.Entities.Button(ContentManagerName, false); StartGameButton.Name = "StartGameButton"; AboutButton = new BeefBall.Entities.Button(ContentManagerName, false); AboutButton.Name = "AboutButton"; ExitButton = new BeefBall.Entities.Button(ContentManagerName, false); ExitButton.Name = "ExitButton"; StartGameButton.Click += OnStartButtonClick; StartGameButton.Click += OnStartButtonClickTunnel; AboutButton.Click += OnAboutButtonClick; AboutButton.Click += OnAboutButtonClickTunnel; ExitButton.Click += OnExitButtonClick; ExitButton.Click += OnExitButtonClickTunnel; StartGameButton.RollOn += OnStartButtonRollOn; StartGameButton.RollOn += OnStartButtonRollOnTunnel; StartGameButton.RollOff += OnStartButtonRollOff; StartGameButton.RollOff += OnStartButtonRollOffTunnel; AboutButton.RollOn += OnAboutButtonRollOn; AboutButton.RollOn += OnAboutButtonRollOnTunnel; AboutButton.RollOff += OnAboutButtonRollOff; AboutButton.RollOff += OnAboutButtonRollOffTunnel; ExitButton.RollOn += OnExitButtonRollOn; ExitButton.RollOn += OnExitButtonRollOnTunnel; ExitButton.RollOff += OnExitButtonRollOff; ExitButton.RollOff += OnExitButtonRollOffTunnel; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/splashscreen/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/splashscreen/scenefile.scnx", ContentManagerName); SpriteObject = SceneFile.Sprites.FindByName("frblogo5121"); this.NextScreen = typeof(TesisEconoFight.Screens.MenuPrincipal).FullName; PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
public override void Initialize(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/charselect/escogerchar.shcx", ContentManagerName)) { } EscogerChar = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/screens/charselect/escogerchar.shcx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Scene>(@"content/screens/charselect/scenefile.scnx", ContentManagerName)) { } SceneFile = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Scene>(@"content/screens/charselect/scenefile.scnx", ContentManagerName); if (!FlatRedBall.FlatRedBallServices.IsLoaded<FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/charselect/seleccionpersonaje.achx", ContentManagerName)) { } SeleccionPersonaje = FlatRedBall.FlatRedBallServices.Load<FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/charselect/seleccionpersonaje.achx", ContentManagerName); Cursores = new FlatRedBall.Math.PositionedObjectList<TesisEconoFight.Entities.Kursor>(); Cursores.Name = "Cursores"; Sprite1 = SceneFile.Sprites.FindByName("cara hayek1"); Sprite2 = SceneFile.Sprites.FindByName("cara hayek2"); PostInitialize(); base.Initialize(addToManagers); if (addToManagers) { AddToManagers(); } }
protected virtual void InitializeEntity(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); CapacitorScn = SceneFile2.Clone(); for (int i = 0; i < CapacitorScn.Texts.Count; i++) { CapacitorScn.Texts[i].AdjustPositionForPixelPerfectDrawing = true; } mCollision = CapacitorCollisionFile.Polygons.FindByName("Polygon1").Clone(); PostInitialize(); if (addToManagers) { AddToManagers(null); } }
protected virtual void InitializeEntity(bool addToManagers) { // Generated Initialize LoadStaticContent(ContentManagerName); EntireScene = SceneFile.Clone(); for (int i = 0; i < EntireScene.Texts.Count; i++) { EntireScene.Texts[i].AdjustPositionForPixelPerfectDrawing = true; } mBody = new FlatRedBall.Math.Geometry.Circle(); InstructionText = new FlatRedBall.Graphics.Text(); PostInitialize(); if (addToManagers) { AddToManagers(null); } }