예제 #1
0
        public void Fill(clgf.Anim.Anim anim, clgf.Anim.Element elem, TextureMgr tmgr, string texpath)
        {
            //if (string.IsNullOrEmpty(elem.seednow))
            //{
            //    return;
            //}
            if (anim.parent.seeds.ContainsKey(elem.seednow) == false)
            {
                return;
            }

            var seed = anim.parent.seeds[elem.seednow];

            //string filename = System.IO.Path.GetFileNameWithoutExtension(elem.seed.texname);
            block      = tmgr.GetTexture(System.IO.Path.Combine(texpath, seed.texname));
            seedorient = seed.orient;
            seedsize   = seed.size;
            color      = elem.color;
            pos        = elem.pos;
            scale      = elem.scale;

            rotate = elem.rotate;
            bounds = Seed.CalcRotate(seed.size * scale, seed.orient * scale, rotate);
            bounds.Offset(pos.X, pos.Y);
            tag = elem.tag;
            if (tag == null)
            {
                tag = "";
            }
            if (tag.IndexOf("dummy:") == 0)
            {
                isdummy = true;
                tag     = tag.Substring(6);
            }
        }
예제 #2
0
 public void InitWithTextureBlock(Texture.TexturePacket.TextureBlock tb)
 {
     block      = tb;
     seedsize.X = (float)tb.parent.texture.Width * tb.uv.Width;
     seedsize.Y = (float)tb.parent.texture.Height * tb.uv.Height;
     seedorient = new Vector2(0, 0);
 }
예제 #3
0
 public void InitWithTextureBlock(Texture.TexturePacket.TextureBlock tb)
 {
     block = tb;
     seedsize.X = (float)tb.parent.texture.Width * tb.uv.Width;
     seedsize.Y = (float)tb.parent.texture.Height * tb.uv.Height;
     seedorient = new Vector2(0, 0);
 }
예제 #4
0
            public tpos(Seed seed, clgf.Texture.TexturePacket.TextureBlock block)
            {
                this.block = block;
                this.size  = new Size((int)seed.size.X, (int)seed.size.Y);

                if (seed.size.X - size.Width > 0)
                {
                    this.size.Width++;
                }
                if (seed.size.Y - size.Height > 0)
                {
                    this.size.Height++;
                }
                this.orientY = seed.orient.Y;
            }
예제 #5
0
 public void InitWithSeed(Seed seed, Texture.TextureMgr tmgr)
 {
     block      = tmgr.GetTexture(seed.texname);
     seedsize   = seed.size;
     seedorient = seed.orient;
 }
예제 #6
0
            public tpos(Seed seed, clgf.Texture.TexturePacket.TextureBlock block)
            {
                this.block = block;
                this.size = new Size((int)seed.size.X, (int)seed.size.Y);

                if (seed.size.X - size.Width > 0) this.size.Width++;
                if (seed.size.Y - size.Height > 0) this.size.Height++;
                this.orientY = seed.orient.Y;
            }
예제 #7
0
 public void InitWithSeed(Seed seed,Texture.TextureMgr tmgr)
 {
     block=tmgr.GetTexture(seed.texname);
     seedsize=seed.size;
     seedorient =seed.orient;
 }