Exemplo n.º 1
0
 public string Name()
 {
     if (GameSettingsViewComponent.GetLanguage() == Language.Chinese)
     {
         return(this.Chinese);
     }
     else
     {
         return(this.English);
     }
 }
Exemplo n.º 2
0
 public string Type()
 {
     if (GameSettingsViewComponent.GetLanguage() == Language.Chinese)
     {
         return("坦克");
     }
     else
     {
         return("Tank");
     }
 }
Exemplo n.º 3
0
        public static string Get(int id)
        {
            Map message = Game.Scene.GetComponent <ConfigComponent>().Get(typeof(Map), id) as Map;

            if (GameSettingsViewComponent.GetLanguage() == Language.Chinese)
            {
                return(message.ChineseMapName);
            }
            else
            {
                return(message.EnglishMapName);
            }
        }
Exemplo n.º 4
0
        private void ChooseString()
        {
            if (GameSettingsViewComponent.GetLanguage() == Language.Chinese)
            {
                this.m_models = this.m_modelsC;

                this.m_rounds = this.m_roundsC;

                this.m_times = this.m_timesC;
            }
            else
            {
                this.m_models = this.m_modelsE;

                this.m_rounds = this.m_roundsE;

                this.m_times = this.m_timesE;
            }
        }
Exemplo n.º 5
0
        public static string Get(int id)
        {
            Message message = Game.Scene.GetComponent <ConfigComponent>().Get(typeof(Message), id) as Message;

            if (message == null)
            {
                return("null");
            }

            Language language = GameSettingsViewComponent.GetLanguage();

            if (language == Language.Chinese)
            {
                return(message.Chinese);
            }
            else
            {
                return(message.English);
            }
        }
Exemplo n.º 6
0
        protected override void StartFUI()
        {
            this.m_closeBtn = this.FUIComponent.Get("Close").GObject.asButton;

            this.m_closeBtn.onClick.Set(this.OnClose);

            this.m_enterBtn = this.FUIComponent.Get("Enter").GObject.asButton;

            this.m_enterBtn.onClick.Set(this.EnterBtn_OnClick);

            IConfig[] configs = Game.Scene.GetComponent <ConfigComponent>().GetAll(typeof(Map)) as IConfig[];

            this.m_roomName = this.FUIComponent.Get("n7").GObject.asLabel;

            this.m_roomName.text = $"{PlayerComponent.Instance.MyPlayer.Name}{Message.Get(1067)}";

            this.m_peopleNum = this.FUIComponent.Get("n2").GObject.asComboBox;

            this.m_peopleNum.items = m_nums;

            this.m_peopleNum.values = m_nums;

            this.m_peopleNum.selectedIndex = 0;

            this.m_map = this.FUIComponent.Get("n6").GObject.asComboBox;

            foreach (IConfig conf in configs)
            {
                Map map = conf as Map;

                if (GameSettingsViewComponent.GetLanguage() == Language.Chinese)
                {
                    this.m_mapNames.Add(map.ChineseMapName);
                }
                else
                {
                    this.m_mapNames.Add(map.EnglishMapName);
                }
                this.m_mapId.Add(map.Id.ToString());
            }

            this.m_map.items = this.m_mapNames.ToArray();

            this.m_map.values = this.m_mapId.ToArray();
            //this.m_map.items = this.m_map.values = this.m_mapNames;

            this.m_map.selectedIndex = 0;

            this.m_bigModel = this.FUIComponent.Get("n10").GObject.asComboBox;

            this.m_bigModel.items = this.m_bigModel.values = this.m_models;

            this.m_smallModel = this.FUIComponent.Get("n11").GObject.asComboBox;

            this.m_bigModel.onChanged.Set(BigModel_OnChange);

            this.m_bigModel.value = this.m_models[0];

            this.m_smallModel.items = this.m_smallModel.values = this.m_rounds;

            this.m_smallModel.selectedIndex = 0;
            //this.m_smallModel.items = this.m_smallModel.values = this.

            this.UI();
        }