public static new void LoadStaticContent(string contentManagerName) { if (string.IsNullOrEmpty(contentManagerName)) { throw new System.ArgumentException("contentManagerName cannot be empty or null"); } Frbcon2019.Screens.MiniGameBase.LoadStaticContent(contentManagerName); // Set the content manager for Gum var contentManagerWrapper = new FlatRedBall.Gum.ContentManagerWrapper(); contentManagerWrapper.ContentManagerName = contentManagerName; RenderingLibrary.Content.LoaderManager.Self.ContentLoader = contentManagerWrapper; // Access the GumProject just in case it's async loaded var throwaway = GlobalContent.CoreUIs; #if DEBUG if (contentManagerName == FlatRedBall.FlatRedBallServices.GlobalContentManager) { HasBeenLoadedWithGlobalContentManager = true; } else if (HasBeenLoadedWithGlobalContentManager) { throw new System.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 Gum.Wireframe.GraphicalUiElement.IsAllLayoutSuspended = true; MemoryGameGum = new FlatRedBall.Gum.GumIdb(); MemoryGameGum.LoadFromFile("content/gumproject/screens/memorygamegum.gusx"); MemoryGameGum.AssignReferences(); Gum.Wireframe.GraphicalUiElement.IsAllLayoutSuspended = false; MemoryGameGum.Element.UpdateLayout(); MemoryGameGum.Element.UpdateLayout(); CustomLoadStaticContent(contentManagerName); }
public static void LoadStaticContent(string contentManagerName) { if (string.IsNullOrEmpty(contentManagerName)) { throw new System.ArgumentException("contentManagerName cannot be empty or null"); } // Set the content manager for Gum var contentManagerWrapper = new FlatRedBall.Gum.ContentManagerWrapper(); contentManagerWrapper.ContentManagerName = contentManagerName; RenderingLibrary.Content.LoaderManager.Self.ContentLoader = contentManagerWrapper; // Access the GumProject just in case it's async loaded var throwaway = GlobalContent.GumProject; #if DEBUG if (contentManagerName == FlatRedBall.FlatRedBallServices.GlobalContentManager) { HasBeenLoadedWithGlobalContentManager = true; } else if (HasBeenLoadedWithGlobalContentManager) { throw new System.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 TestLevel = FlatRedBall.TileGraphics.LayeredTileMap.FromTiledMapSave("content/screens/gamescreen/levels/testlevel.tmx", contentManagerName); Gum.Wireframe.GraphicalUiElement.IsAllLayoutSuspended = true; GameScreenGum = new FlatRedBall.Gum.GumIdb(); GameScreenGum.LoadFromFile("content/gumproject/screens/gamescreengum.gusx"); GameScreenGum.AssignReferences(); Gum.Wireframe.GraphicalUiElement.IsAllLayoutSuspended = false; GameScreenGum.Element.UpdateLayout(); GameScreenGum.Element.UpdateLayout(); GreasyPlatypusSlapper.Entities.CameraEntity.LoadStaticContent(contentManagerName); CustomLoadStaticContent(contentManagerName); }
public static void LoadStaticContent(string contentManagerName) { if (string.IsNullOrEmpty(contentManagerName)) { throw new System.ArgumentException("contentManagerName cannot be empty or null"); } // Set the content manager for Gum var contentManagerWrapper = new FlatRedBall.Gum.ContentManagerWrapper(); contentManagerWrapper.ContentManagerName = contentManagerName; RenderingLibrary.Content.LoaderManager.Self.ContentLoader = contentManagerWrapper; // Access the GumProject just in case it's async loaded var throwaway = GlobalContent.GumProject; #if DEBUG if (contentManagerName == FlatRedBall.FlatRedBallServices.GlobalContentManager) { HasBeenLoadedWithGlobalContentManager = true; } else if (HasBeenLoadedWithGlobalContentManager) { throw new System.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 empty_building = FlatRedBall.FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/screens/mainmenu/empty_building.png", contentManagerName); AbbatoirIntergradeAnimation = FlatRedBall.FlatRedBallServices.Load <FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/screens/mainmenu/abbatoirintergradeanimation.achx", contentManagerName); AbbatoirIntergradeText = FlatRedBall.FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/screens/mainmenu/abbatoirintergradetext.png", contentManagerName); blue_eye = FlatRedBall.FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/screens/mainmenu/blue_eye.png", contentManagerName); Gum.Wireframe.GraphicalUiElement.IsAllLayoutSuspended = true; MainMenuGum = new FlatRedBall.Gum.GumIdb(); MainMenuGum.LoadFromFile("content/gumproject/screens/mainmenugum.gusx"); MainMenuGum.AssignReferences(); Gum.Wireframe.GraphicalUiElement.IsAllLayoutSuspended = false; MainMenuGum.Element.UpdateLayout(); MainMenuGum.Element.UpdateLayout(); CustomLoadStaticContent(contentManagerName); }
public static void LoadStaticContent(string contentManagerName) { if (string.IsNullOrEmpty(contentManagerName)) { throw new System.ArgumentException("contentManagerName cannot be empty or null"); } // Set the content manager for Gum var contentManagerWrapper = new FlatRedBall.Gum.ContentManagerWrapper(); contentManagerWrapper.ContentManagerName = contentManagerName; RenderingLibrary.Content.LoaderManager.Self.ContentLoader = contentManagerWrapper; // Access the GumProject just in case it's async loaded var throwaway = GlobalContent.GumProject; #if DEBUG if (contentManagerName == FlatRedBall.FlatRedBallServices.GlobalContentManager) { HasBeenLoadedWithGlobalContentManager = true; } else if (HasBeenLoadedWithGlobalContentManager) { throw new System.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 worldmap = FlatRedBall.FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/screens/mapscreen/worldmap.png", contentManagerName); Gum.Wireframe.GraphicalUiElement.IsAllLayoutSuspended = true; MapScreenGum = new FlatRedBall.Gum.GumIdb(); MapScreenGum.LoadFromFile("content/gumproject/screens/mapscreengum.gusx"); MapScreenGum.AssignReferences(); Gum.Wireframe.GraphicalUiElement.IsAllLayoutSuspended = false; MapScreenGum.Element.UpdateLayout(); MapScreenGum.Element.UpdateLayout(); if (Messages == null) { { // We put the { and } to limit the scope of oldDelimiter char oldDelimiter = FlatRedBall.IO.Csv.CsvFileManager.Delimiter; FlatRedBall.IO.Csv.CsvFileManager.Delimiter = ','; System.Collections.Generic.Dictionary <string, AbbatoirIntergrade.DataTypes.Messages> temporaryCsvObject = new System.Collections.Generic.Dictionary <string, AbbatoirIntergrade.DataTypes.Messages>(); FlatRedBall.IO.Csv.CsvFileManager.CsvDeserializeDictionary <string, AbbatoirIntergrade.DataTypes.Messages>("content/screens/mapscreen/messages.csv", temporaryCsvObject); FlatRedBall.IO.Csv.CsvFileManager.Delimiter = oldDelimiter; Messages = temporaryCsvObject; } } StructureSelection = FlatRedBall.FlatRedBallServices.Load <Microsoft.Xna.Framework.Audio.SoundEffect>(@"content/screens/mapscreen/structureselection", contentManagerName); CustomLoadStaticContent(contentManagerName); }