Esempio n. 1
0
 public Texture3D GetTexture3D(string resourceString)
 {
     if (Texture3Ds.Count(res => res.ResourceString.Equals(resourceString)) == 1)
     {
         return(Texture3Ds.First(res => res.ResourceString.Equals(resourceString)).Content);
     }
     else
     {
         return(null);
     }
 }
Esempio n. 2
0
        public void Purge(Game game)
        {
            Textures.Clear();
            Texture2Ds.Clear();
            Texture3Ds.Clear();
            Models.Clear();
            Effects.Clear();
            Fonts.Clear();

            Textures   = new List <ContentResource <Texture> >();
            Texture2Ds = new List <ContentResource <Texture2D> >();
            Texture3Ds = new List <ContentResource <Texture3D> >();
            Models     = new List <ContentResource <Model> >();
            Effects    = new List <ContentResource <Effect> >();
            Fonts      = new List <ContentResource <SpriteFont> >();

            game.Content.Unload();
        }