Class RoomUpdater
Inheritance
System.Object
RoomUpdater
Namespace: Eco.Gameplay.Rooms
Assembly: Eco.Gameplay.dll
Syntax
public class RoomUpdater : Object
Constructors
RoomUpdater()
Declaration
public RoomUpdater()
Methods
RemoveRoom(Room)
Declaration
public static void RemoveRoom(Room room)
Parameters
Type | Name | Description |
---|---|---|
Room | room |
Update(ThreadSafeList<Room>, ThreadSafeDictionary<WrappedWorldPosition3i, Room>, IEnumerable<WrappedWorldPosition3i>, IEnumerable<Room>)
Update rooms to reflect the actual blocks. Adds to the passed list and sets up world objects.
Declaration
public static RoomUpdater.Changes Update(ThreadSafeList<Room> rooms, ThreadSafeDictionary<WrappedWorldPosition3i, Room> posToRooms, IEnumerable<WrappedWorldPosition3i> positions, IEnumerable<Room> roomsToUpdateValue)
Parameters
Type | Name | Description |
---|---|---|
ThreadSafeList<Room> | rooms | Full list of rooms, which is added to. |
ThreadSafeDictionary<WrappedWorldPosition3i, Room> | posToRooms | |
System.Collections.Generic.IEnumerable<WrappedWorldPosition3i> | positions | Positions that we need to check for updates |
System.Collections.Generic.IEnumerable<Room> | roomsToUpdateValue |
Returns
Type | Description |
---|---|
RoomUpdater.Changes | The changes that occurred during the update: new, changed, and removed rooms. |
UpdateValueOnly(IEnumerable<Room>)
A more limited update that simply builds the room values, keeping the existing room stats on each room.
Declaration
public static void UpdateValueOnly(IEnumerable<Room> rooms)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Room> | rooms |