示例#1
0
    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);
                }
            }
        }
    }
示例#3
0
 void PlayerEnteredRoom(RoomZone room)
 {
     currentZone = room.zone;
 }
示例#4
0
 internal void LoadRoom(RoomZone room)
 {
     RoomZones.Add(room);
     Zones.Add(room, DrawZone(room));
 }
示例#5
0
    public void Show(RoomZone zone)
    {
        gameObject.SetActive(true);

        Zone = zone;
    }