public RoomZone CreateRoom(string faction, params Cell[] cells) { var newZone = new RoomZone(); RoomZones.Add(newZone); name = $"Room {RoomZones.Count}"; AssignAndPopulateZone(faction, cells, newZone); return(newZone); }
private void OnTriggerEnter(Collider other) { if (other.tag == "Interactable") { Interactable interactable = other.GetComponent <Interactable>(); if (interactable != null) { SetFocus(interactable); } } if (other.tag == "Zone") { RoomZone roomZone = other.GetComponent <RoomZone>(); if (roomZone != null) { if (onEnteredRoomCallback != null) { onEnteredRoomCallback.Invoke(roomZone); } } } }
void PlayerEnteredRoom(RoomZone room) { currentZone = room.zone; }
internal void LoadRoom(RoomZone room) { RoomZones.Add(room); Zones.Add(room, DrawZone(room)); }
public void Show(RoomZone zone) { gameObject.SetActive(true); Zone = zone; }