/// <summary> /// Implements the actual loading process. /// </summary> public void Load() { // Load the drawable using PhysFs Texture texture = Core.Backend.CreateTexture(filename); TextureDrawable drawable = new TextureDrawable(texture); // Set the drawable in the cache AssetLoader.Instance.Drawables[key] = drawable; }
/// <summary> /// Implements the actual loading process. /// </summary> public void Load() { // See if we already have it TextureDrawable drawable = null; if (AssetLoader.Instance.Drawables.Contains(key)) { drawable = (TextureDrawable)AssetLoader.Instance.Drawables[key]; } else // Create it { // Load the drawable using PhysFs Texture texture = Core.Backend.CreateTexture(filename); drawable = new TextureDrawable(texture); AssetLoader.Instance.Drawables[key] = drawable; } // Set the drawable in the asset sprite sprite.Drawables.Add(drawable); }
/// <summary> /// Implements the actual loading process. /// </summary> public void Load() { // See if we already have it TextureDrawable drawable = null; if (AssetLoader.Instance.Drawables.Contains(key)) { drawable = (TextureDrawable) AssetLoader.Instance.Drawables[key]; } else // Create it { // Load the drawable using PhysFs Texture texture = Core.Backend.CreateTexture(filename); drawable = new TextureDrawable(texture); AssetLoader.Instance.Drawables[key] = drawable; } // Set the drawable in the asset sprite sprite.Drawables.Add(drawable); }