getImageTime() public method

Gets the image time.
public getImageTime ( int index ) : float
index int Array index to return
return float
Ejemplo n.º 1
0
    IEnumerator PlayCutsImageSequence()
    {
        float currTime = 0.0f;

        for (int i = 0; i < cs.NoOfImages(); i++)
        {
            yield return(new WaitForSeconds(cs.getImageTime(i) - currTime));            //Wait until it is time for the frame

            currTime          = cs.getImageTime(i);                                     //For the next wait.
            currentFrameLoops = cs.getImageLoops(i);
            if (currentFrameLoops != 0)
            {
                anim.looping = true;
            }
            else
            {
                anim.looping = false;
            }
            SetAnimationFile = cs.getImageFrame(i);
        }
        SetAnimationFile = "Anim_Base";       //End of anim.
        PlayingSequence  = false;
        PostAnimPlay();
        End();
    }