Esempio n. 1
0
    private void DrawMatchFilteringWindow(int id)
    {
        GUI.Label(labelBoardMatchFilteringRect, strEmpty, Board_MatchFiltering);
        GUI.Label(labelBoardSelectMapTitleRect, strEmpty, Board_SelectMapTitle);

        if(matchFilterMap == (int)Definition.eSceneID.MinePit) {
            GUI.backgroundColor = Color.yellow;
        }

            if(GUI.Button(buttonMatchFilterMinePitMapRect, strMinePit)) {
                matchFilterMap = (int)Definition.eSceneID.MinePit;
            }

        if(matchFilterMap == (int)Definition.eSceneID.MinePit) {
            GUI.backgroundColor = Color.white;
        }

        if(matchFilterMap == (int)Definition.eSceneID.HighSpeedRoad) {
            GUI.backgroundColor = Color.yellow;
        }

            if(GUI.Button(buttonMatchFilterHighSpeedRoadMapRect, strHighSpeedRoad)) {
                matchFilterMap = (int)Definition.eSceneID.HighSpeedRoad;
            }

        if(matchFilterMap != (int)Definition.eSceneID.HighSpeedRoad) {
            GUI.backgroundColor = Color.white;
        }

        GUILayout.BeginArea(boxMatchFilterMaxPlayerNumberRect);
            GUILayout.BeginHorizontal();
                if(matchFilterMaxPlayerNumber == 2) {
                    GUI.backgroundColor = Color.yellow;
                }

                    if(GUILayout.Button(strArrayMaxPlayerNumberTwo)) {
                        matchFilterMaxPlayerNumber = 2;
                    }

                if(matchFilterMaxPlayerNumber == 2) {
                    GUI.backgroundColor = Color.white;
                }

        //--
                if(matchFilterMaxPlayerNumber == 3) {
                    GUI.backgroundColor = Color.yellow;
                }

                    if(GUILayout.Button(strArrayMaxPlayerNumberThree)) {
                        matchFilterMaxPlayerNumber = 3;
                    }

                if(matchFilterMaxPlayerNumber == 3) {
                    GUI.backgroundColor = Color.white;
                }

        //--

                if(matchFilterMaxPlayerNumber == 4) {
                    GUI.backgroundColor = Color.yellow;
                }

                    if(GUILayout.Button(strArrayMaxPlayerNumberFour)) {
                        matchFilterMaxPlayerNumber = 4;
                    }

                if(matchFilterMaxPlayerNumber == 4) {
                    GUI.backgroundColor = Color.white;
                }
            GUILayout.EndHorizontal();
        GUILayout.EndArea();

        if(matchFilterMap == 0 || matchFilterMaxPlayerNumber == 0) {
            GUI.Label(buttonMatchFilterConfirmRect, strEmpty, Button_MatchFilterConfirmDark);
        }else{
            if(GUI.Button(buttonMatchFilterConfirmRect, strEmpty, Button_MatchFilterConfirm)) {
                matchController.AutoMatchStart(matchFilterMap, matchFilterMaxPlayerNumber);
                focusState = LobbyController.FocusState.MATCHING;
            }
        }

        if(GUI.Button(buttonMatchFilterCancelRect, strEmpty, Button_MatchFilterCancel)) {

            matchFilterMap = 0;
            matchFilterMaxPlayerNumber = 0;
            focusState = LobbyController.FocusState.LOBBY;
        }
    }
Esempio n. 2
0
    public void EnterSelectMap()
    {
        this.focusState = LobbyController.FocusState.LOBBY;
        this.drawState = LobbyController.DrawState.QUIT;

        OnBeforeLobbyBoardUp();

        isSelectingMap = true;
    }
Esempio n. 3
0
 void SelectMapMatch(Definition.eSceneID map)
 {
     matchFilterMap = (int)map;
     matchFilterMaxPlayerNumber = 4;
     matchController.AutoMatchStart(matchFilterMap, matchFilterMaxPlayerNumber);
     focusState = LobbyController.FocusState.MATCHING;
 }
Esempio n. 4
0
    public void Back()
    {
        //		Network.Disconnect();
        //		Application.LoadLevel(Definition.eSceneID.LoginScene.ToString());
        this.focusState = LobbyController.FocusState.LOBBY;
        this.drawState = LobbyController.DrawState.QUIT;
        OnBeforeLobbyBoardUp();
        this.isLeavingLobby = true;

        if(OnLeaveLobby != null) {
            OnLeaveLobby();
        }
    }
Esempio n. 5
0
    void OnLevelWasLoaded(int mapIndex)
    {
        if(mapIndex == (int)Definition.eSceneID.LobbyScene) {
            isSelectingMap = false;
            isEnterPlayerBase = false;
            isLeavingLobby = false;
            //isPlayerDataLoaded = false;
            this.focusState = LobbyController.FocusState.LOBBY;
            this.drawState = LobbyController.DrawState.ENTER;
            isDraw = true;

            switch(currentLanguage) {
                case Definition.eLanguage.ENGLISH:
        //					Debug.Log("OnLevelWasLoaded:Definition.eLanguage.ENGLISH");
                    this.lobbySkin = Resources.Load("Skin/LobbyEnglishLanguage", typeof(GUISkin)) as GUISkin;
                    break;

                case Definition.eLanguage.SIMPLECHINESE:
        //					Debug.Log("OnLevelWasLoaded:Definition.eLanguage.SIMPLECHINESE");
                    this.lobbySkin = Resources.Load("Skin/LobbySimpleChineseLanguage",  typeof(GUISkin)) as GUISkin;
                    break;

                case Definition.eLanguage.TRANDITIONALCHIINESE:
        //					Debug.Log("OnLevelWasLoaded:Definition.eLanguage.TRANDITIONALCHIINESE");
                    this.lobbySkin = Resources.Load("Skin/LobbyTranditionalChineseLanguage",  typeof(GUISkin)) as GUISkin;
                    break;
            }

            lobbySceneViewer = GameObject.FindObjectOfType(typeof(LobbySceneViewer)) as LobbySceneViewer;

            networkView.RPC("SendToGameLobby_LoadChatRoomPlayer", RPCMode.Server, lobbyRoom.roomIndex, this.playerInfo.GUPID);
            enabled = true;

            OnEnteredLobby();
        }else{

            this.focusState = LobbyController.FocusState.LOBBY;
            this.drawState = LobbyController.DrawState.FREE;
            isDraw = false;
            this.lobbySkin = null;
        //			Resources.UnloadAsset(this.lobbySkin);

            enabled = false;
        }

        if(mapIndex == (int)Definition.eSceneID.MapScene){

            if(OnSelectingMap != null) {
                OnSelectingMap();
            }

        }

        //Debug.Log("Lobby:OnLevelWasLoaded");
    }