18 lines
457 B
C#
18 lines
457 B
C#
using PrimeTween;
|
|
using UnityEngine;
|
|
|
|
namespace PrimeTweenDemo
|
|
{
|
|
public class TestAnimation:MonoBehaviour
|
|
{
|
|
[SerializeField] Transform animationAnchor;
|
|
public bool _isClosed;
|
|
|
|
public void Test()
|
|
{
|
|
var rotationTween = Tween.LocalRotation(animationAnchor, _isClosed ? new Vector3(0, -90) : Vector3.zero, 0.7f, Ease.InOutElastic);
|
|
var sequence = Sequence.Create(rotationTween);
|
|
}
|
|
}
|
|
}
|