using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;

public class TimeLinePlayer : MonoBehaviour
{
    [SerializeField]
    private PlayableDirector timeLine;

    private void Awake()
    {
        timeLine = GetComponent<PlayableDirector>();
    }
    public void Play()
    {
        this.gameObject.SetActive(true);
        timeLine.Stop();
        timeLine.time = 0f;
        timeLine.Play();
    }
    public void Stop()
    {
        timeLine.Stop();
        this.gameObject.SetActive(false);
    }
}
