Пример #1
0
    /// <summary>
    /// Sets the board we are looking at
    /// </summary>
    /// <param name="boardId">Id of board to look at</param>
    private void switchViewImpl(int boardId)
    {
        // If offline (play in editor) there is no second board
        if (!PhotonNetwork.IsConnected)
        {
            boardId = m_id;
        }

        if (m_viewBoard != boardId)
        {
            BoardManager board = GameManager.manager.getBoardManager(boardId);
            if (board)
            {
                transform.position = board.ViewPosition;
                m_viewBoard        = boardId;

                if (m_playerUI)
                {
                    m_playerUI.notifyScreenViewSwitch(m_viewBoard == m_id);
                }
            }

            SoundEffectsManager.setActiveGroup(m_viewBoard);
        }
    }