add some effects
This commit is contained in:
@@ -17,28 +17,11 @@ public class MirrorAnimationHandler : MonoBehaviour
|
||||
|
||||
public void Init()
|
||||
{
|
||||
_material.DOColor(_baseColor, 0);
|
||||
_material.DOColor(_baseColor, .2f);
|
||||
_visualizer.OnDetectionStatusChanged += isDetected =>
|
||||
{
|
||||
if(isDetected)
|
||||
{
|
||||
Debug.Log("хуй");
|
||||
|
||||
transform.DOLocalRotate(Vector3.up * (360f - 35f), 1f)
|
||||
.SetRelative()
|
||||
.SetEase(Ease.InOutSine)
|
||||
.SetLoops(1)
|
||||
.OnComplete(() => _material.DOColor(Color.white, .5f));
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.DOLocalRotate(Vector3.up * (360f + 35f), 1f)
|
||||
.SetRelative()
|
||||
.SetLoops(1)
|
||||
.SetEase(Ease.InOutSine);
|
||||
|
||||
_material.DOColor(_baseColor, .5f);
|
||||
}
|
||||
if(isDetected) _material.DOColor(Color.white, .5f);
|
||||
else _material.DOColor(_baseColor, .5f);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user