Exemplo n.º 1
0
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (MazetechFont_1 != null)
         {
             MazetechFont_1 = null;
         }
         if (MazetechFont != null)
         {
             MazetechFont = null;
         }
         if (MazetechFont_0 != null)
         {
             MazetechFont_0 = null;
         }
         if (MessageTexture != null)
         {
             MessageTexture = null;
         }
     }
 }
Exemplo n.º 2
0
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (BackgroundTexture != null)
         {
             BackgroundTexture = null;
         }
         if (Background4 != null)
         {
             Background4 = null;
         }
         if (Background5 != null)
         {
             Background5 = null;
         }
         if (Background1 != null)
         {
             Background1 = null;
         }
         if (Background2 != null)
         {
             Background2 = null;
         }
         if (Background3 != null)
         {
             Background3 = null;
         }
     }
 }
 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 <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/screens/testscreen/gold.png", contentManagerName))
     {
     }
     Gold = FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/screens/testscreen/gold.png", contentManagerName);
     if (!FlatRedBallServices.IsLoaded <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/parallaxbackground/parallaxtexture.png", contentManagerName))
     {
     }
     ParallaxTexture = FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/parallaxbackground/parallaxtexture.png", contentManagerName);
     ParalaxEntity.Entities.ParallaxBackground.LoadStaticContent(contentManagerName);
     CustomLoadStaticContent(contentManagerName);
 }
Exemplo n.º 4
0
 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("BoardTileStaticUnload", UnloadStaticContent);
                 mRegisteredUnloads.Add(ContentManagerName);
             }
         }
         if (!FlatRedBallServices.IsLoaded <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/boardtile/tilenone.png", ContentManagerName))
         {
             registerUnload = true;
         }
         TileNone = FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/boardtile/tilenone.png", ContentManagerName);
         if (!FlatRedBallServices.IsLoaded <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/boardtile/tileotexture.png", ContentManagerName))
         {
             registerUnload = true;
         }
         TileOTexture = FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/boardtile/tileotexture.png", ContentManagerName);
         if (!FlatRedBallServices.IsLoaded <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/boardtile/tilextexture.png", ContentManagerName))
         {
             registerUnload = true;
         }
         TileXTexture = FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/boardtile/tilextexture.png", ContentManagerName);
     }
     if (registerUnload && ContentManagerName != FlatRedBallServices.GlobalContentManager)
     {
         lock (mLockObject)
         {
             if (!mRegisteredUnloads.Contains(ContentManagerName) && ContentManagerName != FlatRedBallServices.GlobalContentManager)
             {
                 FlatRedBallServices.GetContentManagerByName(ContentManagerName).AddUnloadMethod("BoardTileStaticUnload", UnloadStaticContent);
                 mRegisteredUnloads.Add(ContentManagerName);
             }
         }
     }
     CustomLoadStaticContent(contentManagerName);
 }
Exemplo n.º 5
0
 public static new void LoadStaticContent(string contentManagerName)
 {
     if (string.IsNullOrEmpty(contentManagerName))
     {
         throw new ArgumentException("contentManagerName cannot be empty or null");
     }
     ContentManagerName = contentManagerName;
     PlatformerCharacterBase.LoadStaticContent(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("PlayerStaticUnload", UnloadStaticContent);
                 mRegisteredUnloads.Add(ContentManagerName);
             }
         }
         if (!FlatRedBallServices.IsLoaded <FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/entities/player/animationchainlistfile.achx", ContentManagerName))
         {
             registerUnload = true;
         }
         AnimationChainListFile = FlatRedBallServices.Load <FlatRedBall.Graphics.Animation.AnimationChainList>(@"content/entities/player/animationchainlistfile.achx", ContentManagerName);
         if (!FlatRedBallServices.IsLoaded <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/player/playertexture.png", ContentManagerName))
         {
             registerUnload = true;
         }
         PlayerTexture = FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/player/playertexture.png", ContentManagerName);
     }
     if (registerUnload && ContentManagerName != FlatRedBallServices.GlobalContentManager)
     {
         lock (mLockObject)
         {
             if (!mRegisteredUnloads.Contains(ContentManagerName) && ContentManagerName != FlatRedBallServices.GlobalContentManager)
             {
                 FlatRedBallServices.GetContentManagerByName(ContentManagerName).AddUnloadMethod("PlayerStaticUnload", UnloadStaticContent);
                 mRegisteredUnloads.Add(ContentManagerName);
             }
         }
     }
     CustomLoadStaticContent(contentManagerName);
 }
Exemplo n.º 6
0
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (PlayerTexture != null)
         {
             PlayerTexture = null;
         }
     }
 }
        public override void Destroy()
        {
            // Generated Destroy
            Gold            = null;
            ParallaxTexture = null;

            if (ParallaxBackgroundInstance != null)
            {
                ParallaxBackgroundInstance.Destroy();
                ParallaxBackgroundInstance.Detach();
            }

            base.Destroy();

            CustomDestroy();
        }
Exemplo n.º 8
0
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (Paint100 != null)
         {
             Paint100 = null;
         }
         if (Paint100_0 != null)
         {
             Paint100_0 = null;
         }
     }
 }
Exemplo n.º 9
0
 public static new void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (AnimationChainListFile != null)
         {
             AnimationChainListFile = null;
         }
         if (PlayerTexture != null)
         {
             PlayerTexture = null;
         }
     }
 }
 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 <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/screens/ccgsplashscreen/ccgsplash.png", contentManagerName))
     {
     }
     CcgSplash = FlatRedBallServices.Load <Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/screens/ccgsplashscreen/ccgsplash.png", contentManagerName);
     FrbTicTacToe.Entities.Label.LoadStaticContent(contentManagerName);
     CustomLoadStaticContent(contentManagerName);
 }
Exemplo n.º 11
0
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (HumanTexture != null)
         {
             HumanTexture = null;
         }
         if (ComputerTexture != null)
         {
             ComputerTexture = null;
         }
         if (IconHighlight != null)
         {
             IconHighlight = null;
         }
     }
 }
        public override void Destroy()
        {
            // Generated Destroy
            CcgSplash = null;

            if (CcgLogo != null)
            {
                SpriteManager.RemoveSprite(CcgLogo);
            }
            if (CreatedByLabel != null)
            {
                CreatedByLabel.Destroy();
                CreatedByLabel.Detach();
            }
            if (CCGLabel != null)
            {
                CCGLabel.Destroy();
                CCGLabel.Detach();
            }

            base.Destroy();

            CustomDestroy();
        }
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (Transparent_8x8 != null)
         {
             Transparent_8x8= null;
         }
     }
 }
Exemplo n.º 14
0
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (arrow != null)
         {
             arrow= null;
         }
     }
 }
Exemplo n.º 15
0
 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("MainMenuStaticUnload", UnloadStaticContent);
                 mRegisteredUnloads.Add(ContentManagerName);
             }
         }
         if (!FlatRedBallServices.IsLoaded<Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/xuilikedemo/mainmenu/arrow.png", ContentManagerName))
         {
             registerUnload = true;
         }
         arrow = FlatRedBallServices.Load<Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/xuilikedemo/mainmenu/arrow.png", ContentManagerName);
     }
     if (registerUnload && ContentManagerName != FlatRedBallServices.GlobalContentManager)
     {
         lock (mLockObject)
         {
             if (!mRegisteredUnloads.Contains(ContentManagerName) && ContentManagerName != FlatRedBallServices.GlobalContentManager)
             {
                 FlatRedBallServices.GetContentManagerByName(ContentManagerName).AddUnloadMethod("MainMenuStaticUnload", UnloadStaticContent);
                 mRegisteredUnloads.Add(ContentManagerName);
             }
         }
     }
     CustomLoadStaticContent(contentManagerName);
 }
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (teddy_fucked != null)
         {
             teddy_fucked= null;
         }
     }
 }
Exemplo n.º 17
0
 public static void UnloadStaticContent()
 {
     if (LoadedContentManagers.Count != 0)
     {
         LoadedContentManagers.RemoveAt(0);
         mRegisteredUnloads.RemoveAt(0);
     }
     if (LoadedContentManagers.Count == 0)
     {
         if (BirdShapeCollection != null)
         {
             BirdShapeCollection.RemoveFromManagers(ContentManagerName != "Global");
             BirdShapeCollection= null;
         }
         if (SpriterObjectCollectionFile != null)
         {
             SpriterObjectCollectionFile.Destroy();
             SpriterObjectCollectionFile= null;
         }
         if (redball != null)
         {
             redball= null;
         }
     }
 }
Exemplo n.º 18
0
 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("BirdStaticUnload", UnloadStaticContent);
                 mRegisteredUnloads.Add(ContentManagerName);
             }
         }
         if (!FlatRedBallServices.IsLoaded<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/entities/bird/birdshapecollection.shcx", ContentManagerName))
         {
             registerUnload = true;
         }
         BirdShapeCollection = FlatRedBallServices.Load<FlatRedBall.Math.Geometry.ShapeCollection>(@"content/entities/bird/birdshapecollection.shcx", ContentManagerName);
         if (!FlatRedBallServices.IsLoaded<FlatRedBall_Spriter.SpriterObjectCollection>(@"content/entities/bird/spriterobjectcollectionfile.scml", ContentManagerName))
         {
             registerUnload = true;
         }
         SpriterObjectCollectionFile = SpriterObjectSave.FromFile("content/entities/bird/spriterobjectcollectionfile.scml").ToRuntime();
         if (!FlatRedBallServices.IsLoaded<Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/bird/redball.png", ContentManagerName))
         {
             registerUnload = true;
         }
         redball = FlatRedBallServices.Load<Microsoft.Xna.Framework.Graphics.Texture2D>(@"content/entities/bird/redball.png", ContentManagerName);
     }
     if (registerUnload && ContentManagerName != FlatRedBallServices.GlobalContentManager)
     {
         lock (mLockObject)
         {
             if (!mRegisteredUnloads.Contains(ContentManagerName) && ContentManagerName != FlatRedBallServices.GlobalContentManager)
             {
                 FlatRedBallServices.GetContentManagerByName(ContentManagerName).AddUnloadMethod("BirdStaticUnload", UnloadStaticContent);
                 mRegisteredUnloads.Add(ContentManagerName);
             }
         }
     }
     CustomLoadStaticContent(contentManagerName);
 }