Пример #1
0
    public void StartAnimation(Animation anim)
    {
        if (anim.mat.type != currentMaterial.type)
        {
            meshRenderer.material = anim.mat.material;
        }
        currentAnimation = anim;
        currentMaterial  = anim.mat;

        currentFrame = 0;
        time         = Timer.time;
        Frame frame = currentAnimation.frames[0];

        SheetFuncs.SetTexture(frame.x, frame.y, frame.width, frame.height, filter);
    }