using EscapeRoomEngine.Engine.Runtime.Environment;
using NaughtyAttributes;
using UnityEngine;
using UnityEngine.Serialization;

namespace EscapeRoomEngine.Engine.Runtime
{
    public class Intro : MonoBehaviour
    {
        public RoomEnvironment introEnvironment;
        [FormerlySerializedAs("_sphereAudio")] [BoxGroup("Internal")] [SerializeField] private AudioSource sphereAudio;
        
        public void Place(Transform placement)
        {
            var t = transform;
            t.position = placement.position;
            t.rotation = placement.rotation;
        }

        public void StartTalking()
        {
            sphereAudio.Play();
        }
    }
}