using UnityEngine;

namespace EscapeRoomEngine.Engine.Runtime
{
    public class IntroSpace : Space
    {
        internal IntroSpace(Room room, Passage entrance) : base(room, entrance) {}

        internal override void InstantiateSpace(Transform parent, string name)
        {
            spaceObject = new GameObject($"Space {name}");
            spaceObject.transform.SetParent(parent, false);
            spaceObject.transform.localPosition = new Vector3(rrPlacement.position.x, 0, rrPlacement.position.z);

            // instantiate all modules inside this space
            Modules.ForEach(module => module.InstantiateModule(spaceObject.transform));
        }
    }
}