예제 #1
0
        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);
        }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
0
 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;
 }
예제 #5
0
 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;
 }
예제 #6
0
 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;
 }
예제 #7
0
        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);
        }
예제 #8
0
        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;
        }
예제 #9
0
        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;
        }
예제 #10
0
 /// <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));
 }
예제 #11
0
 public StripDummy(World world, AssetTextureStrip textureStrip)
     : base(world)
 {
     this.texture = new DrawableTextureStrip(textureStrip, this);
 }
예제 #12
0
 public StripDummy(World world, AssetTextureStrip textureStrip)
     : base(world)
 {
     this.texture = new DrawableTextureStrip(textureStrip, this);
 }
예제 #13
0
 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;
 }