private SpriteMetaData[] GetSpriteMetaData(ProcessingFrame frame, int numU, int numV)
        {
            SpriteMetaData[] result = new SpriteMetaData[numU * numV];

            float width  = (float)frame.texture.width / numU;
            float height = (float)frame.texture.height / numV;

            for (int i = 0; i < numU; i++)
            {
                for (int j = 0; j < numV; j++)
                {
                    SpriteMetaData data = new SpriteMetaData();
                    data.name = "Frame_" + (i + (j * numU));
                    data.rect = new Rect(i * width, (numV - j - 1) * height, width, height);
                    result[i + (j * numU)] = data;
                }
            }

            return(result);
        }
Exemplo n.º 2
0
 public bool Process(ProcessingFrame frame)
 {
     return(Process(OutputSequence.frames.IndexOf(frame)));
 }