Example #1
0
 void OnLoginInfoRefreshed()
 {
     if (_currentRoom != null)
     {
         _currentRoom.ActivateRoom();
         if (OnRoomFocused != null)
         {
             OnRoomFocused();
         }
     }
 }
Example #2
0
    public void FocusRoom(int roomID)
    {
        Debug.Log("Focus Room " + roomID);

        if (_currentRoom != null)
        {
            _currentRoom.DeActivateRoom();
            _currentRoom.transform.position = _currentRoom.outPosition;
        }

        if (_rooms == null)
        {
            return;
        }


        RoomHelper newRoom;

        if (!_rooms.TryGetValue(roomID, out newRoom))
        {
            Debug.LogError("Room " + roomID + " doesn't exist");
            return;
        }
        Debug.Log("new room " + newRoom.name);

        _currentRoom   = newRoom;
        _currentRoomId = roomID;

        ChapterUIManager.instance.AlignRoomToRoomAreaRect(_currentRoom);



        _currentRoom.ActivateRoom();
        if (OnRoomFocused != null)
        {
            OnRoomFocused();
        }
    }