public static void InputAniDate(AniInfo aniInfo, List<AniFrame> arrFrames)
		{
			AniData aniData = new AniData();
			aniData.aniInfo = aniInfo;
			aniData.arrFrames = arrFrames;
			arrDatas.Add(aniData);
			curId++;
		}
示例#2
0
        public static void InputAniDate(AniInfo aniInfo, List <AniFrame> arrFrames)
        {
            AniData aniData = new AniData();

            aniData.aniInfo   = aniInfo;
            aniData.arrFrames = arrFrames;
            arrDatas.Add(aniData);
            curId++;
        }
示例#3
0
        public static void aaa()
        {
            BeginInput(@"F:\te.txt");

            AniInfo ai = new AniInfo();

            ai.aniName    = @"attack";
            ai.fileName   = @"att1.png";
            ai.frameCount = 2;
            ai.id         = 1001;
            ai.version    = 1000;
            ai.offset     = 0;

            List <AniFrame> arrFrames = new List <AniFrame>();
            AniFrame        af        = new AniFrame();

            af.rectX        = 0;
            af.rectY        = 0;
            af.rectWidth    = 32;
            af.rectHeight   = 32;
            af.offsetX      = 0;
            af.offsetY      = 0;
            af.offsetZ      = 0;
            af.num          = 1;
            af.nextInterval = 1000f;

            arrFrames.Add(af);

            af              = new AniFrame();
            af.rectX        = 32;
            af.rectY        = 0;
            af.rectWidth    = 32;
            af.rectHeight   = 32;
            af.offsetX      = 0;
            af.offsetY      = 0;
            af.offsetZ      = 0;
            af.num          = 2;
            af.nextInterval = 1001f;

            arrFrames.Add(af);


            InputAniDate(ai, arrFrames);
            InputAniDate(ai, arrFrames);
            EndInputAndSave();

            //byte[] br = File.ReadAllBytes("test.txt");

            //AniInfo a2 = (AniInfo)Common.BytesToStruct(br, typeof(AniInfo));

            //System.Console.WriteLine(a2.aniName + " " + ai.id);
            //FileStream fs = new FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.Write, FileShare.None);
            //byte[] bys = StructToBytes(ai);
            //MemoryStream ms = new MemoryStream(bys);

            //do
            //{
            //	byte[] b =
            //} while (true);
            //fs.Dispose();
            //fs.Close();
        }
		public static void aaa()
		{
			BeginInput(@"F:\te.txt");

			AniInfo ai = new AniInfo();
			ai.aniName = @"attack";
			ai.fileName = @"att1.png";
			ai.frameCount = 2;
			ai.id = 1001;
			ai.version = 1000;
			ai.offset = 0;

			List<AniFrame> arrFrames = new List<AniFrame>();
			AniFrame af = new AniFrame();
			af.rectX = 0;
			af.rectY = 0;
			af.rectWidth = 32;
			af.rectHeight = 32;
			af.offsetX = 0;
			af.offsetY = 0;
			af.offsetZ = 0;
			af.num = 1;
			af.nextInterval = 1000f;

			arrFrames.Add(af);

			af = new AniFrame();
			af.rectX = 32;
			af.rectY = 0;
			af.rectWidth = 32;
			af.rectHeight = 32;
			af.offsetX = 0;
			af.offsetY = 0;
			af.offsetZ = 0;
			af.num = 2;
			af.nextInterval = 1001f;

			arrFrames.Add(af);


			InputAniDate(ai,arrFrames);
			InputAniDate(ai, arrFrames);
			EndInputAndSave();
			
			//byte[] br = File.ReadAllBytes("test.txt");

			//AniInfo a2 = (AniInfo)Common.BytesToStruct(br, typeof(AniInfo));

			//System.Console.WriteLine(a2.aniName + " " + ai.id);
			//FileStream fs = new FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.Write, FileShare.None);
			//byte[] bys = StructToBytes(ai);
			//MemoryStream ms = new MemoryStream(bys);
			
			//do
			//{
			//	byte[] b = 
			//} while (true);
			//fs.Dispose();
			//fs.Close(); 
			
		}