rabidus-test/Assets/Scripts/CutsceneLookAt.cs

26 lines
462 B
C#
Raw Normal View History

2023-09-11 15:44:17 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CutsceneLookAt : MonoBehaviour
{
private Animator _animator;
2023-09-18 20:09:22 +03:00
[SerializeField]
private string _animation;
2023-09-11 15:44:17 +03:00
private void Awake()
{
_animator = GetComponent<Animator>();
}
public void StartCutscene()
{
2023-09-18 20:09:22 +03:00
_animator.Play(_animation);
2023-09-11 15:44:17 +03:00
}
public void EndCutscene()
{
2023-09-18 20:09:22 +03:00
GameManager.Instance.OnFinish();
2023-09-11 15:44:17 +03:00
}
}