Removing cache from Gleed2D as ContentManager automatically does this
Adding cache Adding XOR Shift random class
This commit is contained in:
		@@ -20,7 +20,7 @@ namespace Axios.Engine.Gleed2D
 | 
			
		||||
        /// Called by Level.FromFile(filename) on each Item after the deserialization process.
 | 
			
		||||
        /// Should be overriden and can be used to load anything needed by the Item (e.g. a texture).
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public virtual void load(AxiosGameScreen gameScreen, ref Dictionary<string, Texture2D> cache)
 | 
			
		||||
        public virtual void load(AxiosGameScreen gameScreen)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -30,9 +30,9 @@ namespace Axios.Engine.Gleed2D
 | 
			
		||||
            this._item = i;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void load(AxiosGameScreen gameScreen, ref Dictionary<string, Texture2D> cache)
 | 
			
		||||
        public override void load(AxiosGameScreen gameScreen)
 | 
			
		||||
        {
 | 
			
		||||
            base.load(gameScreen, ref cache);
 | 
			
		||||
            base.load(gameScreen);
 | 
			
		||||
            
 | 
			
		||||
            Vertices v = new Vertices(LayerItem.LocalPoints.Count);
 | 
			
		||||
            foreach (Vector2 vec in LayerItem.LocalPoints)
 | 
			
		||||
 
 | 
			
		||||
@@ -39,20 +39,20 @@ namespace Axios.Engine.Gleed2D
 | 
			
		||||
        /// You must provide your own implementation. However, you can rely on all public fields being
 | 
			
		||||
        /// filled by the level deserialization process.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public override void load(AxiosGameScreen gameScreen, ref Dictionary<string, Texture2D> cache)
 | 
			
		||||
        public override void load(AxiosGameScreen gameScreen)
 | 
			
		||||
        {
 | 
			
		||||
            base.load(gameScreen, ref cache);
 | 
			
		||||
            base.load(gameScreen);
 | 
			
		||||
            //throw new NotImplementedException();
 | 
			
		||||
 | 
			
		||||
            //TODO: provide your own implementation of how a TextureItem loads its assets
 | 
			
		||||
            //for example:
 | 
			
		||||
            //this.texture = Texture2D.FromFile(<GraphicsDevice>, texture_filename);
 | 
			
		||||
            //or by using the Content Pipeline:
 | 
			
		||||
            if (!cache.ContainsKey(LayerItem.AssetName))
 | 
			
		||||
            /*if (!cache.ContainsKey(LayerItem.AssetName))
 | 
			
		||||
            {
 | 
			
		||||
                cache[LayerItem.AssetName] = gameScreen.ScreenManager.Game.Content.Load<Texture2D>(LayerItem.AssetName);   
 | 
			
		||||
            }
 | 
			
		||||
            this.texture = cache[LayerItem.AssetName];
 | 
			
		||||
            }*/
 | 
			
		||||
            this.texture = gameScreen.ScreenManager.Game.Content.Load<Texture2D>(LayerItem.AssetName);
 | 
			
		||||
            //Visible = gameScreen.LoadTextureItem(this);
 | 
			
		||||
            
 | 
			
		||||
            //this.texture = cm.Load<Texture2D>(asset_name);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user