Traveller/scripts/map/roomPlacer/RoomPlacerTemplate.cs

36 lines
839 B
C#
Raw Normal View History

2024-04-28 13:55:19 +00:00
using System.Collections.Generic;
using System.Threading.Tasks;
using ColdMint.scripts.map.dateBean;
using ColdMint.scripts.map.interfaces;
using Godot;
namespace ColdMint.scripts.map.RoomPlacer;
public abstract class RoomPlacerTemplate : IRoomPlacer
{
private List<IRoom> _placedRooms;
protected void Init()
{
_placedRooms = new List<IRoom>();
}
public abstract Task<bool> PlaceRoom(Vector2 position, IRoom room);
public abstract Task<Vector2> CalculatedPosition(IRoom mainRoom, IRoom newRoom, RoomSlot mainRoomSlot, RoomSlot newRoomSlot,
RoomPlacerConfig roomPlacerConfig);
public int PlacedRoomNumber
{
get
{
if (_placedRooms == null)
{
return 0;
}
return _placedRooms.Count;
}
}
}