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-10-02 19:12:35 +03:00
|
|
|
[SerializeField] private Transform _carier;
|
|
|
|
[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-10-02 19:12:35 +03:00
|
|
|
_carier.parent = transform;
|
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
|
|
|
}
|
|
|
|
}
|