Пример #1
0
        public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
        {
            // Set the helper window header's language display.
            m_HelperWindowHeaderText.text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Help_WindowHeaderText, language);

            // Set the helper window categroy tip's language display.
            m_HelpInfoCategroyTip.text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Help_WindowCategoryText, language);

            // Set the dropdown menu's language diaplay.
            for (int index = 0; index < m_HelpInfoCategory.options.Count; index++)
            {
                m_HelpInfoCategory.options[index].text = HelperInfoManager.GetCategroyText((HelperInfoManager.HelpInfoCategory)index);
            }

            // Reset dropdown menu.
            m_HelpInfoCategory.value       = 1;
            m_HelpInfoCategory.value       = 0;
            m_CurrentSelectedCategoryIndex = 0;

            // Set the helper info list's language display.
            OnUpdateHelperInfoButtonList(m_CurrentSelectedCategoryIndex);

            // Set the helper window's return button's language display.
            m_ReturnButton.GetComponentInChildren <Text>().text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Help_ReturnButtonText, language);
        }
Пример #2
0
        public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
        {
            // DOTO: Temporary method
            switch (m_NavType)
            {
            case LobbyManager.LobbyPageCategory.CreateRoom:
                m_Button.GetComponentInChildren <Text>().text = GameLanguageManager.GetText(
                    GameLanguageManager.KeyWord.NavB_CreateRoomButtonText, language);
                break;

            case LobbyManager.LobbyPageCategory.RoomBrowser:
                m_Button.GetComponentInChildren <Text>().text = GameLanguageManager.GetText(
                    GameLanguageManager.KeyWord.NavB_RoomBrowserButtonText, language);
                break;

            case LobbyManager.LobbyPageCategory.LoadOut:
                m_Button.GetComponentInChildren <Text>().text = GameLanguageManager.GetText(
                    GameLanguageManager.KeyWord.NavB_LoadOutButtonText, language);
                break;

            default:
#if UNITY_EDITOR
                Debug.LogError("The navigation type is none.");
#endif
                break;
            }
        }
Пример #3
0
        public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
        {
            m_KillMessage = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Igms_KillMessage, language);
            m_LeftMessage = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Igms_LeftMessage, language);
            m_JoinMessage = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Igms_JoinMessage, language);

            m_Middel = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Igms_Middel, language);
        }
Пример #4
0
        private void OnUpdateLanguageDisplay(GameLanguageManager.SupportedLanguage language)
        {
            m_RoomListHeaderIndex.text = GameLanguageManager.GetText(
                GameLanguageManager.KeyWord.Lobb_RoomListHeaderIndex, language);

            m_RoomListHeaderRoomName.text = GameLanguageManager.GetText(
                GameLanguageManager.KeyWord.Lobb_RoomListHeaderRoomName, language);

            m_RoomListHeaderPlayer.text = GameLanguageManager.GetText(
                GameLanguageManager.KeyWord.Lobb_RoomListHeaderPlayer, language);
        }
Пример #5
0
        public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
        {
            m_DialogContext.GetComponent <Text>().text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Dlog_ExitGameContext, language);

            m_ConfirmButton.GetComponentInChildren <Text>().text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Dlog_ExitGameConfirmButton, language);

            m_DenyButton.GetComponentInChildren <Text>().text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Dlog_ExitGameDenyButton, language);
        }
Пример #6
0
 public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
 {
     m_ReturnButton.GetComponentInChildren <Text>().text =
         GameLanguageManager.GetText(GameLanguageManager.KeyWord.Menu_ReturnButtonText, language);
     m_SettingsButton.GetComponentInChildren <Text>().text =
         GameLanguageManager.GetText(GameLanguageManager.KeyWord.Menu_SettingsButtonText, language);
     m_HelpButton.GetComponentInChildren <Text>().text =
         GameLanguageManager.GetText(GameLanguageManager.KeyWord.Menu_HelpButtonText, language);
     m_AboutButton.GetComponentInChildren <Text>().text =
         GameLanguageManager.GetText(GameLanguageManager.KeyWord.Menu_AboutButtonText, language);
     m_ExitRoomButtonText.text =
         GameLanguageManager.GetText(GameLanguageManager.KeyWord.Menu_ExitRoomButtonText, language);
 }
Пример #7
0
        public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
        {
            m_SettingsWindowHeader.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Sett_SettingsWindowHeader, language);

            m_LanguageSettingHeader.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Sett_LanguageCategoryHeader, language);

            m_SaveButton.GetComponentInChildren <Text>().text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Sett_SettingsWindowSaveButton, language);

            m_ReturnButton.GetComponentInChildren <Text>().text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Sett_SettingsWindowReturnButton, language);
        }
Пример #8
0
        /// <summary>
        /// The method for the room name's input field.
        /// </summary>
        /// <param name="name">The name of the room.</param>
        private void SetRoomName(string name)
        {
            // If the room name is null or empty, user can't create a game.
            CreateRoomButton.interactable = string.IsNullOrEmpty(name) ? false : true;

            if (CreateRoomButton.interactable)
            {
                CreateRoomButtonText.text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_CreateRoomConfirm, GameLanguageManager.CurrentLanguage);
            }
            else
            {
                CreateRoomButtonText.text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_NeedAName, GameLanguageManager.CurrentLanguage);
            }

            // Store user input.
            m_RoomName = name;
        }
Пример #9
0
        private void SetLanguage(GameLanguageManager.SupportedLanguage language)
        {
            m_PlayerCountLabelText.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.RooP_PlayerCountLabel, language);

            m_HealthLimitLabelText.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.RooP_HealthLimitLabel, language);

            m_TimeLimitLabelText.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.RooP_TimeLimitLabel, language);

            m_ScoreLimitLabelText.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.Roop_ScoreLimitLabel, language);

            m_RoomFull = GameLanguageManager.GetText(GameLanguageManager.KeyWord.RooP_JoinButtonRoomFull, language);
            m_Join     = GameLanguageManager.GetText(GameLanguageManager.KeyWord.RooP_JoinButtonCanJoin, language);
        }
Пример #10
0
        public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
        {
            RoomNameInputLable.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_RoomNameInputLable, language);

            MapSelectLable.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_MapSelectLable, language);

            PlayerLimitLable.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_PlayerLimitLable, language);

            GameModeLable.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_GameModeLable, language);

            TimeLimiLable.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_TimeLimiLable, language);

            HealthLimitLable.text =
                GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_HealthLimitLabel, language);
        }
Пример #11
0
        /// <summary>
        /// Responce to the create room button clicked event.
        /// </summary>
        public void OnClikedCreateRoomButton()
        {
            // SoundManager.Instance.PlayUISFX(SoundManager.UISFX.MenuConfirm);
            // Prevent form user accidently clicked this button multiple times.
            CreateRoomButton.interactable = false;

            // LobbyManager.Instance.EnableCurrentPageFunction(false);
            // Check if the room name is ok to be used.
            if (RoomNameCheck())
            {
                CreateRoomButtonText.text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_CreatingRoomText, GameLanguageManager.CurrentLanguage);
                // Disable all user input while creating a game room
                // LobbyManager.IgnoreUserInput = true;
                // Set room options based on the user settings.
                RoomOptions roomOption = SetRoomOptions();
                // Create room with these room options.
                NetworkManager.Instance.CreateRoom(m_RoomName, roomOption);
            }
            else
            {
                CreateRoomButtonText.text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_SameNameExistWarning, GameLanguageManager.CurrentLanguage);
            }
        }
Пример #12
0
        /// <summary>
        /// Use this for initialization
        /// </summary>
        public override void InitUI()
        {
            base.InitUI();

            Properties = new UIProperties(
                UIframework.UIManager.SceneUIs.CreateRoomUI,
                UIframework.UIManager.DisplayUIMode.Normal,
                UIframework.UIManager.UITypes.UnderBlurEffect,
                false, true);

            #region Init variables
            // The user inserted room name.
            m_RoomName = "";

            // The user selected game map scene name.
            m_GameMapID = 0;

            // The user selected game mode.
            m_GameModeID = 0;

            // The maximun player count limit.
            m_PlayerLimit = 0;

            // The time limit pre round.
            m_TimeLimit = 0;

            // The health limit for every player pre life.
            m_HealthLimit = 0;
            #endregion

            #region Room name
            if (RoomNameInput)
            {
                RoomNameInput.onValueChanged.AddListener((Value) => SetRoomName(Value));
            }
            #endregion

            #region Map select
            if (MapSelect)
            {
                for (int index = 0; index < GameMapManager.GetMapCount; index++)
                {
                    MapSelect.options.Add(new Dropdown.OptionData()
                    {
                        text = GameMapManager.GetGameMap(index).GameMapName
                    });
                }

                // We need this step to refresh the options list.
                MapSelect.value = 1;
                MapSelect.value = 0;

                // Set default values.
                m_GameMapID = 0;
                SetMapPreview(0);

                // Add event listener to the drop down menu.
                MapSelect.onValueChanged.AddListener((value) => SetGameMap(value));
            }
            #endregion

            #region Player limit setting
            if (PlayerLimit)
            {
                for (int index = 0; index < CustomRoomOptions.AvaliablePlayerLimitOptions.Length; index++)
                {
                    PlayerLimit.options.Add(new Dropdown.OptionData()
                    {
                        text = CustomRoomOptions.AvaliablePlayerLimitOptions[index].ToString() + " 人"
                    });
                }

                // We need this step to refresh the options list.
                PlayerLimit.value = 1;
                PlayerLimit.value = 0;

                // Set default value.
                m_PlayerLimit = CustomRoomOptions.AvaliablePlayerLimitOptions[0];

                // Add event listener to the drop down menu.
                PlayerLimit.onValueChanged.AddListener((value) => SetPlayerLimit(value));
            }
            #endregion

            #region Game mode setting
            if (GameMode)
            {
                for (int index = 0; index < GameModeManager.GetGameModeCount; index++)
                {
                    GameMode.options.Add(new Dropdown.OptionData()
                    {
                        text = GameModeManager.GetGameModeDetail(index).GameModeName
                    });
                }

                // We need this step to refresh the options list.
                GameMode.value = 1;
                GameMode.value = 0;

                // Set default value.
                m_GameModeID = 0;

                // Add event listener to the drop down menu.
                GameMode.onValueChanged.AddListener((value) => SetGameMode(value));
            }
            #endregion

            #region Time limit setting
            if (TimeLimit)
            {
                for (int index = 0; index < CustomRoomOptions.AvaliableTimeLimitOptions.Length; index++)
                {
                    TimeLimit.options.Add(new Dropdown.OptionData()
                    {
                        text = CustomRoomOptions.AvaliableTimeLimitOptions[index].ToString() + " 分"
                    });
                }

                // We need this step to refresh the options list.
                TimeLimit.value = 1;
                TimeLimit.value = 0;

                // Set default value.
                m_TimeLimit = CustomRoomOptions.AvaliableTimeLimitOptions[0];

                // Add event listener to the drop down menu.
                TimeLimit.onValueChanged.AddListener((value) => SetTimeLimit(value));
            }
            #endregion

            #region Health limit setting
            if (HealthLimit)
            {
                for (int index = 0; index < CustomRoomOptions.AvaliableHealthLimitOptions.Length; index++)
                {
                    HealthLimit.options.Add(new Dropdown.OptionData()
                    {
                        text = CustomRoomOptions.AvaliableHealthLimitOptions[index].ToString() + " ポイント"
                    });
                }

                // We need this step to refresh the options list.
                HealthLimit.value = 1;
                HealthLimit.value = 0;

                // Set default value.
                m_HealthLimit = CustomRoomOptions.AvaliableHealthLimitOptions[0];

                // Add event listener to the drop down menu.
                HealthLimit.onValueChanged.AddListener((value) => SetHealthLimit(value));
            }
            #endregion

            #region Create room buttom
            if (CreateRoomButton)
            {
                CreateRoomButton.onClick.AddListener(delegate { OnClikedCreateRoomButton(); });
                CreateRoomButton.interactable = false;
                CreateRoomButton.GetComponentInChildren <Text>().text =
                    GameLanguageManager.GetText(GameLanguageManager.KeyWord.CreR_NeedAName, GameLanguageManager.CurrentLanguage);
            }
            #endregion

            SetLanguage(GameLanguageManager.CurrentLanguage);
        }
Пример #13
0
 public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
 {
     m_PupupWindowContext.text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Dlog_NoRoomAvailableText, language);
 }
Пример #14
0
        public override void InitUI()
        {
            base.InitUI();

            Properties = new UIProperties(
                UIframework.UIManager.SceneUIs.SettingsWindowUI,
                UIframework.UIManager.DisplayUIMode.HideOthers,
                UIframework.UIManager.UITypes.AboveBlurEffect,
                false, true, true);

            m_Animator = GetComponent <Animator>();
#if UNITY_EDITOR
            if (!m_Animator)
            {
                Debug.LogError("Animator is null.");
            }
            if (!m_LanguageSettingHeader)
            {
                Debug.LogError("Language settings header is null.");
            }
            if (!m_LanguageSetting)
            {
                Debug.LogError("Language settings is null.");
            }
            if (!m_SettingsWindowHeader)
            {
                Debug.LogError("Settings window header is null.");
            }
            if (!m_SaveButton)
            {
                Debug.LogError("Save button is null");
            }
            if (!m_ReturnButton)
            {
                Debug.LogError("Return button is null");
            }
#endif
            m_SaveButton.onClick.AddListener(delegate { OnClickedSaveButton(); });
            m_ReturnButton.onClick.AddListener(delegate { OnClickedReturnButton(); });

            #region language settings dropdown menu
            if (m_LanguageSetting)
            {
                foreach (var item in Enum.GetValues(typeof(GameLanguageManager.SupportedLanguage)))
                {
                    m_LanguageSetting.options.Add(new Dropdown.OptionData()
                    {
                        text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Sett_LanguageCategory, (GameLanguageManager.SupportedLanguage)item)
                    });
                }

                // We need this step to refresh the options list.
                m_LanguageSetting.value = 1;
                m_LanguageSetting.value = 0;

                // Set default values.
                // m_LanguageIndex = 0;

                // Add event listener to the drop down menu.
                m_LanguageSetting.onValueChanged.AddListener((value) => OnSelectedLanguage(value));
            }
            #endregion

            SetLanguage(GameLanguageManager.CurrentLanguage);
        }
Пример #15
0
 public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
 {
     m_RespawningInSce  = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Resp_RespawningInSce, language);
     m_MurderWeaponText = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Resp_MurderWeaponText, language);
 }
Пример #16
0
 public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
 {
     m_PleaseStandBy = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Open_StartGameTextPleaseStandBy, language);
     m_StartGame     = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Open_StartGameTextStart, language);
 }
Пример #17
0
 public override void SetLanguage(GameLanguageManager.SupportedLanguage language)
 {
     UserNickNameInputFieldTip.text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Main_NickNameInputFieldTip, language);
     LoginButton.GetComponentInChildren<Text>().text = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Main_LoginButtonText, language);
 }
Пример #18
0
 public void SetLanguage(GameLanguageManager.SupportedLanguage language)
 {
     m_ReloadingText = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Weap_ReloadingText, language);
     m_OutOfAmmoText = GameLanguageManager.GetText(GameLanguageManager.KeyWord.Weap_OutOfAmmo, language);
 }