public static AssetTextureStrip createFromAssetTexture(AssetTexture texture, String name) { Texture2D content = texture.createAssetCopy("volatile" + texture.name).texture; AssetTextureStrip strip = new AssetTextureStrip(name, content, StripOrientation.LeftToRight, texture.size); return(strip); }
public DrawableTextureStrip(String textureLabel, GameObject parent) { this.texture = AssetManager.getAssetTextureStrip(textureLabel); this.parent = parent; this.size = new Vector2(texture.width, texture.height); this.filter = Color.White; this.layer = 0f; this.period = 1f; }
public DrawableTextureStrip(AssetTextureStrip texture, GameObject parent) { this.texture = texture; this.parent = parent; this.size = new Vector2(texture.width, texture.height); this.filter = Color.White; this.layer = 0f; this.period = 1f; }
public DrawCallTextureStrip(AssetTextureStrip texture, Vector2 position, float rotation, Color filter, Vector2 scale, float layer, Rectangle source) { this.texture = texture; this.position = position; this.rotation = rotation; this.filter = filter; this.scale = scale; this.layer = layer; this.source = source; }
public AssetTextureStrip createAssetCopy(String name) { Texture2D contentCopy = new Texture2D(_texture.GraphicsDevice, _texture.Width, _texture.Height); Color[] content = new Color[_texture.Width * _texture.Height]; _texture.GetData <Color>(content); contentCopy.SetData <Color>(content); AssetTextureStrip copy = new AssetTextureStrip(name, contentCopy, _orientation, _size); return(copy); }
public AssetTextureStrip createAssetCopy(String name) { Texture2D contentCopy = new Texture2D(_texture.GraphicsDevice, _texture.Width, _texture.Height); Color[] content = new Color[_texture.Width * _texture.Height]; _texture.GetData<Color>(content); contentCopy.SetData<Color>(content); AssetTextureStrip copy = new AssetTextureStrip(name,contentCopy, _orientation, _size); return copy; }
public static AssetTextureStrip createFromAssetTexture(AssetTexture texture, String name) { Texture2D content = texture.createAssetCopy("volatile" + texture.name).texture; AssetTextureStrip strip = new AssetTextureStrip(name, content, StripOrientation.LeftToRight, texture.size); return strip; }
/// <summary> /// A method that creates an AssetTextureStrip from a texture project file and registers it on the AssetManager. /// </summary> /// <param name="label">The label the asset is to be given.</param> /// <param name="fileName">The filename to get the content associated with the asset. </param> /// <param name="frameSize">The size in (width,length) of a single frame in the strip.</param> /// <param name="orientation">The orientation the content is to be loaded in.</param> public static void CreateAssetTextureStrip(String label, String fileName, Point frameSize, AssetTextureStrip.StripOrientation orientation) { Texture2D texture = content.Load<Texture2D>(fileName); textureStrips.Add(new AssetTextureStrip(label, texture, orientation, frameSize)); }
public StripDummy(World world, AssetTextureStrip textureStrip) : base(world) { this.texture = new DrawableTextureStrip(textureStrip, this); }