Exemple #1
0
    void UniAniTest()
    {
        switch (testCase)
        {
        case 0:
            transform.DoPosition(transform.position + Vector3.up * 3, 3f);
            break;

        case 1:
            transform.DoScale(new Vector3(2, 5, 1), 3f);
            break;

        case 2:
            transform.DoRotation(new Vector3(90, 45, 0), 3f);
            break;

        case 3:
            transform.DoPosition(transform.position + Vector3.up * 3, 1.5f, animationType: AnimationType.LOOP);
            break;

        case 4:
            transform.DoPosition(transform.position + Vector3.up * 3, 1.5f, animationType: AnimationType.TURN_LOOP);
            break;

        case 5:
            UniAni uniAni = transform.DoPosition(transform.position + Vector3.up * 3, 3f);
            UniAniManager.Delay(() =>
            {
                uniAni.Kill();
            }, 1.5f);
            break;
        }
    }
Exemple #2
0
    public static void Delay(Action action, float animeTime)
    {
        UniAni uniAni = new UniAni(uniAniList, animeTime, AnimationCurve.Linear(0, 0, 1, 1), AnimationType.ONCE);

        uniAni.SetEndAction(action);
    }