28 lines
650 B
C#
28 lines
650 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Zenject;
|
|
using DG.Tweening;
|
|
using UltraFace;
|
|
|
|
public class MirrorAnimationHandler : MonoBehaviour
|
|
{
|
|
[Inject] private Visualizer _visualizer;
|
|
[SerializeField] private Material _material;
|
|
[SerializeField] private Color _baseColor;
|
|
|
|
private void Start() {
|
|
_material.color = Color.white;
|
|
}
|
|
|
|
public void Init()
|
|
{
|
|
_material.DOFade(0, .5f);
|
|
_visualizer.OnDetectionStatusChanged += isDetected =>
|
|
{
|
|
if(isDetected) _material.DOFade(1, .5f);
|
|
else _material.DOFade(0, .5f);
|
|
};
|
|
}
|
|
}
|