using Godot;
using Rokojori;
using System.Collections.Generic;
using System.Threading.Tasks;

[Tool, GlobalClass]
public partial class SceneRoomGenerator : RoomGenerator
{
  [Export]
  public PackedScene scene;

  public override Room GenerateRoom( Node container, Voronoi2D.Cell cell )
  {
    var room = container.CreateChild<Room>( "Room " + cell.index );
    var center = cell.center.To3DXZ();

    room.GlobalPosition = center;
    var ps = room.CreateChild<Node3D>( scene, "Scene " + cell.index );
    ps.GlobalPosition = center;
    
    return room;
  }
  
}