Newer
Older
HardPoint-Project-Abertay-University-Unity3D / Assets / Scripts / Systems / RandomGeneration / RoomCreatorPreTemplated.cs
@Rackday Rackday on 18 Aug 814 bytes Project Added
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class RoomCreatorPreTemplated : MonoBehaviour, IRoomCreationHandler
{
    [Header("Information of the room")]
    [SerializeField] private ExitScript[] exits = new ExitScript[4];
    [SerializeField] private Vector2 dimensions;
    private RoomInformation roomInfo;

    ProgressController progressController;

    private void Start()
    {
        progressController = GetComponent<ProgressController>();
        if (progressController != null) progressController.StartMe();
    }
    public RoomInformation GetRoomInfo()
    {
        return roomInfo;
    }

    public RoomInformation InstantiateRoom(Vector2 coords)
    {
        roomInfo = new RoomInformation(exits, dimensions, coords);
        return roomInfo;
    }
}