Example #1
0
		public Type7File(Type7Descriptor desc,int start,int frames):base(desc)
		{
			numFrames=frames;

			if(desc!=null)
			{
				this.numFrames=desc.NumFrames;
				start = desc.StartIdx;
			}

			int[,] curr = new int[8,numFrames];

//			Console.WriteLine("North:");

			int x=0;
			for(int pos=0;pos<8;pos++)
				for(int fram=0;fram<numFrames;fram++)
				{
					curr[pos,fram]=start+(pos*numFrames*4)+x+fram;
					//Console.Write((start+(pos*numFrames*4)+x+fram)+" ");
				}

			north = new MovingPartDirection(curr);
			curr = new int[8,numFrames];

//			Console.WriteLine("\nEast:");
			x=numFrames;
			for(int pos=0;pos<8;pos++)
				for(int fram=0;fram<numFrames;fram++)
				{
					curr[pos,fram]=start+(pos*numFrames*4)+x+fram;
//					Console.Write((start+(pos*numFrames*4)+x+fram)+" ");
				}

			east = new MovingPartDirection(curr);
			curr = new int[8,numFrames];

//			Console.WriteLine("\nWest:");
			x=numFrames*2;
			for(int pos=0;pos<8;pos++)
				for(int fram=0;fram<numFrames;fram++)
				{
					curr[pos,fram]=start+(pos*numFrames*4)+x+fram;
//					Console.Write((start+(pos*numFrames*4)+x+fram)+" ");
				}

			west = new MovingPartDirection(curr);
			curr = new int[8,numFrames];

//			Console.WriteLine("\nSouth:");
			x=numFrames*3;
			for(int pos=0;pos<8;pos++)
				for(int fram=0;fram<numFrames;fram++)
				{
					curr[pos,fram]=start+(pos*numFrames*4)+x+fram;
//					Console.Write((start+(pos*numFrames*4)+x+fram)+" ");
				}

			south = new MovingPartDirection(curr);			
		}
Example #2
0
 public BodyPart(int[] stationary, int[,] moving)
 {
     this.notMoving = new PartDirection(stationary);
     this.moving    = new MovingPartDirection(moving);
 }
Example #3
0
 public BodyPart(int[] stationary)
 {
     this.notMoving = new PartDirection(stationary);
     moving         = null;
 }
Example #4
0
        public Type7File(Type7Descriptor desc, int start, int frames) : base(desc)
        {
            numFrames = frames;

            if (desc != null)
            {
                this.numFrames = desc.NumFrames;
                start          = desc.StartIdx;
            }

            int[,] curr = new int[8, numFrames];

//			Console.WriteLine("North:");

            int x = 0;

            for (int pos = 0; pos < 8; pos++)
            {
                for (int fram = 0; fram < numFrames; fram++)
                {
                    curr[pos, fram] = start + (pos * numFrames * 4) + x + fram;
                    //Console.Write((start+(pos*numFrames*4)+x+fram)+" ");
                }
            }

            north = new MovingPartDirection(curr);
            curr  = new int[8, numFrames];

//			Console.WriteLine("\nEast:");
            x = numFrames;
            for (int pos = 0; pos < 8; pos++)
            {
                for (int fram = 0; fram < numFrames; fram++)
                {
                    curr[pos, fram] = start + (pos * numFrames * 4) + x + fram;
//					Console.Write((start+(pos*numFrames*4)+x+fram)+" ");
                }
            }

            east = new MovingPartDirection(curr);
            curr = new int[8, numFrames];

//			Console.WriteLine("\nWest:");
            x = numFrames * 2;
            for (int pos = 0; pos < 8; pos++)
            {
                for (int fram = 0; fram < numFrames; fram++)
                {
                    curr[pos, fram] = start + (pos * numFrames * 4) + x + fram;
//					Console.Write((start+(pos*numFrames*4)+x+fram)+" ");
                }
            }

            west = new MovingPartDirection(curr);
            curr = new int[8, numFrames];

//			Console.WriteLine("\nSouth:");
            x = numFrames * 3;
            for (int pos = 0; pos < 8; pos++)
            {
                for (int fram = 0; fram < numFrames; fram++)
                {
                    curr[pos, fram] = start + (pos * numFrames * 4) + x + fram;
//					Console.Write((start+(pos*numFrames*4)+x+fram)+" ");
                }
            }

            south = new MovingPartDirection(curr);
        }
Example #5
0
		public BodyPart(int[] stationary,int[,]moving)
		{	
			this.notMoving = new PartDirection(stationary);			
			this.moving = new MovingPartDirection(moving);
		}
Example #6
0
		public BodyPart(int[] stationary)
		{
			this.notMoving=new PartDirection(stationary);
			moving=null;
		}