Exemple #1
0
    public void setData(FaceAnimationInfo info)
    {
#if UNITY_EDITOR
        nowAni = info.id;
#endif

        data = info;

        xOffset = info.xOffset;
        //yOffset = info.yOffset;
        yOffset = 0.0f;

        _delay = 0;

        totalFrame = data.frame.Length;
        nowFrame   = 0;

        x = data.setup[data.timeSheet[data.frame[nowFrame]].index].x;
        y = data.setup[data.timeSheet[data.frame[nowFrame]].index].y;

        _v.x = x * xOffset;
        _v.y = y * yOffset;

        renderer.sharedMaterial.SetTextureOffset("_MainTex", _v);

        _isEnabled = true;
    }
Exemple #2
0
 public void clear()
 {
     data = null;
 }