Ejemplo n.º 1
0
        void Start()
        {
            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            string title = Localization.Get("ui.equipments_browse_view.equipments_browse_title");

            _commonTopBarView.SetAsCommonStyle(title, ClickCloseHandler, true, true, true, false);

            equipmentCellNumTitleText.text = Localization.Get("ui.equipments_browse_view.own_equipments_title");

            hasNewEquipmentHintImage.gameObject.SetActive(EquipmentProxy.instance.HasNewEquipment());

            allHeroesToggle.GetComponent <ToggleContent>().Set(1, Localization.Get("ui.equipments_browse_view.roles_equipments_title"));
            allEquipmentsToggle.GetComponent <ToggleContent>().Set(2, Localization.Get("ui.equipments_browse_view.free_equipments_title"));

            roleTypeDropDown.options[0].text  = Localization.Get("ui.equipments_browse_view.equipment_type.all");
            roleTypeDropDown.options[1].text  = Localization.Get("ui.equipments_browse_view.equipment_type.defence");
            roleTypeDropDown.options[2].text  = Localization.Get("ui.equipments_browse_view.equipment_type.offence");
            roleTypeDropDown.options[3].text  = Localization.Get("ui.equipments_browse_view.equipment_type.mage");
            roleTypeDropDown.options[4].text  = Localization.Get("ui.equipments_browse_view.equipment_type.support");
            roleTypeDropDown.options[5].text  = Localization.Get("ui.equipments_browse_view.equipment_type.mighty");
            roleTypeDropDown.captionText.text = roleTypeDropDown.options[0].text;

            equipmentRoleTypeDropDown.options[0].text  = Localization.Get("ui.equipments_browse_view.equipment_type.all");
            equipmentRoleTypeDropDown.options[1].text  = Localization.Get("ui.equipments_browse_view.equipment_type.defence");
            equipmentRoleTypeDropDown.options[2].text  = Localization.Get("ui.equipments_browse_view.equipment_type.offence");
            equipmentRoleTypeDropDown.options[3].text  = Localization.Get("ui.equipments_browse_view.equipment_type.mage");
            equipmentRoleTypeDropDown.options[4].text  = Localization.Get("ui.equipments_browse_view.equipment_type.support");
            equipmentRoleTypeDropDown.options[5].text  = Localization.Get("ui.equipments_browse_view.equipment_type.mighty");
            equipmentRoleTypeDropDown.captionText.text = equipmentRoleTypeDropDown.options[0].text;
            BindDelegate();

            Invoke("Init", 0.01f);
        }
Ejemplo n.º 2
0
        private void Init()
        {
            string title = Localization.Get("ui.change_profession_view.change_profession_title");

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(title, ClickBackHandler, true, true, true, true);

            changeProfessionText.text      = Localization.Get("ui.change_profession_view.change_profession");
            professionStrenthText.text     = Localization.Get("ui.change_profession_view.profession_strenthen");
            hpTitleText.text               = Localization.Get("ui.change_profession_view.health_point");
            attackTitleText.text           = Localization.Get("ui.change_profession_view.attack");
            defenceTitleText.text          = Localization.Get("ui.change_profession_view.defense");
            speedTitleText.text            = Localization.Get("ui.change_profession_view.speed");
            critTitleText.text             = Localization.Get("ui.change_profession_view.critial");
            dodgeTitleText.text            = Localization.Get("ui.change_profession_view.dodge");
            blockTitleText.text            = Localization.Get("ui.change_profession_view.block");
            hitTitleText.text              = Localization.Get("ui.change_profession_view.hit");
            activeSkillsTitleText.text     = Localization.Get("ui.change_profession_view.active_skills");
            passiveSkillsTitleText.text    = Localization.Get("ui.change_profession_view.passive_skills");
            selectProfessionTitleText.text = Localization.Get("ui.change_profession_view.select_profession_title");

            _selectedPlayerData = GameProxy.instance.PlayerInfo.playerData;
            RegenerateProfessionButtons();
            Refresh();
        }
Ejemplo n.º 3
0
        void Awake()
        {
            VIPProxy.instance.onVIPInfoUpdateDelegate          += OnVIPInfoUpdateHandler;
            VIPProxy.instance.onDrawVIPBenefitsSuccessDelegate += OnDrawVIPBenefitsSuccessHandler;

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(Localization.Get("ui.vip_view.title"), ClickCloseHandler, true, true, true, true);
            _commonTopBarView.transform.SetAsFirstSibling();
            vipLevelText.text = "1";
            vipExpText.text   = string.Format(Localization.Get("common.value/max"), 125, 999);

            buyDiamondText.text = Localization.Get("ui.vip_view.buy_diamond");
            conditionToNextVIPLevelText.text = Localization.Get("ui.condition_to_next_vip_level");
            VIPDetailTitleText.text          = Localization.Get("ui.vip_view.vip_detail_title");
            VIPBenefitsTitleText.text        = Localization.Get("ui.vip_view.vip_benefits_title");
            drawVIPBenefitsText.text         = Localization.Get("ui.vip_view.draw_vip_benifits");

            List <VIPData> allVIPDataList = VIPData.GetAllVIPDataList();

            for (int i = 0, allVIPDataCount = allVIPDataList.Count; i < allVIPDataCount; i++)
            {
                VIPPrivilegeDetailItem vipPrivilegeDetailItem = GameObject.Instantiate <VIPPrivilegeDetailItem>(vipPrivilegeDetailItemPrefab);
                vipPrivilegeDetailItem.SetVIPData(allVIPDataList[i]);
                vipPrivilegeDetailItem.transform.SetParent(vipDetailContent, false);
            }
            vipPrivilegeDetailItemPrefab.gameObject.SetActive(false);

            RefreshMyVIPInfo();
            _currentVIPLevel = VIPProxy.instance.VIPLevel;
            RefreshVIPDetail();
        }
Ejemplo n.º 4
0
        void Awake()
        {
            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(string.Empty, ClickCloseHandler, true, true, true, false);
            _commonTopBarView.transform.localPosition = new Vector3(_commonTopBarView.transform.localPosition.x, _commonTopBarView.transform.localPosition.y, -1000);

            Logic.UI.Chat.View.SystemNoticeView.Create(systemNoticeRoot);

            PlayerInfo playerInfo = GameProxy.instance.PlayerInfo;

            _characterEntity = CharacterEntity.CreatePlayerEntityAsUIElement(playerInfo, roleModelRootRectTransform, false, false);
            AnimatorUtil.SetBool(_characterEntity.anim, AnimatorUtil.RUN, true);

            chapterViewPrefab.gameObject.SetActive(true);
            List <ChapterInfo> chapterInfoList = ChapterProxy.instance.GetAllChapterInfos();
            int chapterInfoCount = chapterInfoList.Count;

            for (int i = 0; i < chapterInfoCount; i++)
            {
                ChapterInfo chapterInfo = chapterInfoList[i];
                ChapterView chapterView = GameObject.Instantiate <ChapterView>(chapterViewPrefab);
//                chapterView.SetChapterInfoAndType(chapterInfo);
                chapterView.transform.SetParent(chapterBGsRoot, false);
                chapterView.transform.localScale    = Vector3.one;
                chapterView.transform.localPosition = chapterInfo.chapterData.chapterPosition;
                _chapterViewList.Add(chapterView);
                _chapterViewsDictionary.Add(chapterInfo.chapterData.Id, chapterView);

                int dungeonsCount = chapterInfo.chapterData.easyDungeonIDList.Count;
                for (int dungeonIndex = 0; dungeonIndex < dungeonsCount; dungeonIndex++)
                {
                    int easyDungeonID   = chapterInfo.chapterData.easyDungeonIDList[dungeonIndex];
                    int normalDungeonID = chapterInfo.chapterData.normalDungeonIDList[dungeonIndex];
                    int hardDungeonID   = chapterInfo.chapterData.hardDungeonIDList[dungeonIndex];

                    DungeonButton dungeonButton = GameObject.Instantiate <DungeonButton>(dungeonButtonPrefab);
                    dungeonButton.transform.SetParent(dungeonButtonsRoot, false);
                    dungeonButton.transform.localPosition = chapterInfo.chapterData.chapterPosition + chapterInfo.chapterData.positions[dungeonIndex];
                    dungeonButton.SetDungeonInfo(DungeonProxy.instance.GetDungeonInfo(chapterInfo.chapterData.easyDungeonIDList[dungeonIndex]));
                    dungeonButton.name = string.Format("dungeon_button_{0}", dungeonButton.DungeonInfo.dungeonData.dungeonID);
                    dungeonButton.gameObject.SetActive(true);
                    _easyDungeonButtonDic.Add(easyDungeonID, dungeonButton);
                    _normalDungeonButtonDic.Add(normalDungeonID, dungeonButton);
                    _hardDungeonButtonDic.Add(hardDungeonID, dungeonButton);
                }
                dungeonButtonPrefab.gameObject.SetActive(false);
            }
            chapterViewPrefab.gameObject.SetActive(false);
            selectChapterScrollRect.content.sizeDelta    = RectTransformUtility.CalculateRelativeRectTransformBounds(chapterBGsRoot).size;
            selectChapterScrollRect.onEndDragDelegate   += OnMapEndDragHandler;
            selectChapterScrollRect.onDragLeftDelegate  += OnMapDragLeftHandler;
            selectChapterScrollRect.onDragRightDelegate += OnMapDragRightHandler;
            _chapterScrollViewportSize = selectChapterScrollRect.viewport.rect.size;
            AudioController.instance.PlayBGMusic(Logic.Audio.Controller.AudioController.SELECTDUNGEON);
            BindDelegate();
        }
Ejemplo n.º 5
0
        private void Init()
        {
            string title = Localization.Get("ui.hero_advance_view.hero_advance_title");

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(title, ClickCloseHandler, true, true, true, false);
            attributesAfterAdvanceTitleText.text = Localization.Get("ui.hero_advance_view.attributes_after_advance_title");

            startAdvanceText.text = Localization.Get("ui.hero_advance_view.start_advance_title");
            starReachMaxText.text = Localization.Get("ui.hero_advance_view.star_reach_max");
        }
Ejemplo n.º 6
0
        void Awake()
        {
            string title = Localization.Get("ui.daily_dungeon_info_view.daily_dungeon_info_title");

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(title, ClickCloseHandler, true, true, true, true);

            enemiesPreviewText.text          = Localization.Get("ui.daily_dungeon_info_view.enemies_preview");
            clickEnemyIconForFetailText.text = Localization.Get("ui.daily_dungeon_info_view.click_enemy_icon_for_detail");
            dailyDungeonlootText.text        = Localization.Get("ui.daily_dungeon_info_view.daily_dungeon_loot");
            embattleText.text = Localization.Get("ui.daily_dungeon_info_view.embattle");
            startText.text    = Localization.Get("ui.daily_dungeon_info_view.start");
        }
Ejemplo n.º 7
0
        void Awake()
        {
            BindDelegate();
            _commonTopbarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopbarView.SetAsCommonStyle(Localization.Get("ui.pvp_formation_view.titleText"), ClickCloseHandler, false, false, true, true, true);

            removeRoleText.text          = Localization.Get("ui.pvp_formation_view.remove_from_team");
            rightPanelTransform.position = rightPanelShowPosTransform.position;

            _formationNormalSprite   = ResMgr.instance.Load <Sprite>("sprite/main_ui/bg_unit_02");
            _formationOccupiedSprite = ResMgr.instance.Load <Sprite>("sprite/main_ui/bg_unit_01");
            trainFormationLockImage.gameObject.SetActive(!FunctionOpenProxy.instance.IsFunctionOpen(FunctionOpenType.FormationTraining));
        }
Ejemplo n.º 8
0
        private void Init()
        {
            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            string title = Localization.Get("ui.shop_view.shop_view_title");

            _commonTopBarView.SetAsCommonStyle(title, ClickCloseHandler, true, true, true, true);
            _commonTopBarView.transform.SetAsFirstSibling();

            privilegeText.text = Localization.Get("ui.shop_view.privilege");
            shopTypeText.text  = Localization.Get("ui.shop_view.noble_shop");
            shopItemViewPrefab.gameObject.SetActive(false);
            RefreshMyVIPInfo();
            RegenerateShopDiamondItems();
        }
Ejemplo n.º 9
0
        void Awake()
        {
            BindDelegate();
            _commonTopbarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopbarView.SetAsCommonStyle(Localization.Get("ui.expedition_formation_view.titleText"), ClickCloseHandler, true, true, true, false, false, true);

            removeRoleText.text          = Localization.Get("ui.expedition_formation_view.remove_from_team");
            rightPanelTransform.position = rightPanelShowPosTransform.position;

            _formationNormalSprite   = ResMgr.instance.Load <Sprite>("sprite/main_ui/bg_unit_02");
            _formationOccupiedSprite = ResMgr.instance.Load <Sprite>("sprite/main_ui/bg_unit_01");

            ExpeditionFormationProxy.instance.CheckDeadHeroAtFormation();
        }
Ejemplo n.º 10
0
        void Awake()
        {
            string title = Localization.Get("ui.black_market_view.title");

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(title, ClickCloseHandler, true, true, true, true);
            BindDelegate();

            exchangeTitleText.text    = Localization.Get("ui.black_market_view.exchangeTitle");
            exchangeMaterialText.text = Localization.Get("ui.black_market_view.exchangeMaterial");
            currentGoodsPrefab.gameObject.SetActive(false);
            BlackMarketController.instance.CLIENT2LOBBY_BlackMarket_REQ();
            StartCoroutine(UpdateActivityTimeCoroutine());
        }
Ejemplo n.º 11
0
        private void Init()
        {
            string title = Localization.Get("ui.equipment_strengthen_view.equipment_strengthen_title");

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(title, ClickCloseHandler, true, true, true, false);

            attributesAfterStrengthenTitleText.text = Localization.Get("ui.equipment_strengthen_view.attributes_after_strengthen_title");
            strengthenTipsText.text = Localization.Get("ui.equipment_strengthen_view.strengthen_tips");
            //strengthenLevelText.text = string.Format(Localization.Get("ui.equipment_strengthen_view.strengthen_level"), 0);

            startStrengthenText.text = Localization.Get("ui.equipment_strengthen_view.start_strengthen");
            coinText.text            = string.Format(Localization.Get("ui.equipment_strengthen_view.coin"), 999000);
            selectStrengthenMaterialTitleText.text = Localization.Get("ui.equipment_strengthen_view.select_strengthen_material_title");
            noAvailableStrengthenMaterialText.text = Localization.Get("ui.equipment_strengthen_view.no_available_strengthen_material");
        }
Ejemplo n.º 12
0
        private void initText()
        {
            string title = Localization.Get("ui.hero_combine_view.text_title");

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(title, ClickBackHandler, true, true, true, false);

            text_select_material_title.text = Localization.Get("ui.hero_combine_view.text_select_material_title");

            text_star.text      = Localization.Get("ui.hero_combine_view.text_star");
            text_star_rate.text = Localization.Get("ui.hero_combine_view.text_star_rate");


            text_choice_same_star.text = Localization.Get("ui.hero_combine_view.text_choice_same_star");
            text_btn_combine.text      = Localization.Get("ui.hero_combine_view.text_btn_combine");
        }
Ejemplo n.º 13
0
        private void Init()
        {
            string title = Localization.Get("ui.role_equipments.role_equipments_title");

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(title, ClickCloseHandler, true, true, true, false);

            weaponTitleText.text         = Localization.Get("ui.role_equipments.weapon_title");
            armorTitleText.text          = Localization.Get("ui.role_equipments.armor_title");
            accessoryTitleText.text      = Localization.Get("ui.role_equipments.accessory_title");
            strengthenEquipmentText.text = Localization.Get("ui.role_equipments.strengthen_equipment");
            removeEquipmentText.text     = Localization.Get("ui.role_equipments.remove_equipment");
            ownEquipmentsTitleText.text  = Localization.Get("ui.role_equipments.own_equipments");
            sortText.text     = _sortFreeEquipmentItemsAsc ? Localization.Get("ui.role_equipments.sort_asceding") : Localization.Get("ui.role_equipments.sort_desceding");
            sortAscText.text  = Localization.Get("ui.role_equipments.sort_asceding");
            sortDescText.text = Localization.Get("ui.role_equipments.sort_desceding");
            RefreshEquipmentCellNumText();
            SetSelectedEquipmentInfo(null);
            StartCoroutine(ShowSelectMarkCoroutine());
            attrViewPrefab.gameObject.SetActive(false);
        }
Ejemplo n.º 14
0
        void Awake()
        {
            ManageHeroesProxy.instance.onFormationUpdateHandler          += OnFormationUpdateHandler;
            HeroProxy.instance.onHeroInfoUpdateDelegate                  += onHeroInfoUpdateDelegate;
            HeroProxy.instance.onHeroInfoListUpdateDelegate              += OnHeroInfoListUpdateDelegate;
            TrainFormationProxy.instance.onFormationChangedDelegate      += OnFormationUpdateHandler;
            TrainFormationProxy.instance.onUpgradeTrainFormationDelegate += FormationUpgradeHandler;
            _commonTopbarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopbarView.SetAsCommonStyle(Localization.Get("ui.pve_embattle_view.title"), ClickCloseHandler, true, true, true, false);

            removeRoleText.text           = Localization.Get("ui.pve_embattle_view.remove_role");
            cantRemovePlayerTipsText.text = Localization.Get("ui.pve_embattle_view.cant_remove_player_tips");
            rightPanelTransform.position  = rightPanelShowPosTransform.position;
            _formationNormalSprite        = ResMgr.instance.Load <Sprite>("sprite/main_ui/bg_unit_02");
            _formationOccupiedSprite      = ResMgr.instance.Load <Sprite>("sprite/main_ui/bg_unit_01");

            Invoke("Init", 0.01f);
            cantRemovePlayerTipsRoot.gameObject.SetActive(false);
            removeRoleButton.gameObject.SetActive(false);
            selectedFormationPositionIndicatorImage.gameObject.SetActive(false);
            commonHeroPrefab.SetActive(false);
        }
Ejemplo n.º 15
0
        private void Init()
        {
            string title = Localization.Get("ui.hero_strengthen_view.hero_strengthen_title");

            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(title, ClickCloseHandler, true, true, true, false);

            attributesTitleText.text            = Localization.Get("ui.hero_strengthen_view.attributes_title");
            currentCriticalChanceTitleText.text = Localization.Get("ui.hero_strengthen_view.current_critical_chance_title");
            improveCriticalChanceTitleText.text = Localization.Get("ui.hero_strengthen_view.improve_critical_chance_title");
            strengthenTipsText.text             = Localization.Get("ui.hero_strengthen_view.strengthen_tips");
            //currentExpTitleText.text = Localization.Get("ui.hero_strengthen_view.current_exp_title");

            strengthenText.text = Localization.Get("ui.hero_strengthen_view.strengthen_text");
            selectStrengthenMaterialTitleText.text = Localization.Get("ui.hero_strengthen_view.select_strengthen_material_title");
            noAvailableStrengthenMaterialText.text = Localization.Get("ui.hero_strengthen_view.no_available_strengthen_material");

            string[] choice = new string[] {
                Localization.Get("ui.hero_strengthen_view.sort_ascending"),
                Localization.Get("ui.hero_strengthen_view.sort_descending")
            };
        }
Ejemplo n.º 16
0
        void Start()
        {
            _commonTopBarView = CommonTopBarView.CreateNewAndAttachTo(core.transform);
            _commonTopBarView.SetAsCommonStyle(string.Empty, ClickCloseButtonHandler, false, true, true, true);

            _playerInfo = GameProxy.instance.PlayerInfo;

            changeProfessionText.text = Localization.Get("ui.player_info_view.change_profession");
            petStrengthenText.text    = Localization.Get("ui.player_info_view.pet_strengthen");
            petAdvancText.text        = Localization.Get("ui.player_info_view.player_advance");
            petBreakthroughText.text  = Localization.Get("ui.player_info_view.player_breakthrough");
            playerEquipmentsText.text = Localization.Get("ui.player_info_view.player_equipments");

            hpItem.SetRoleAttributeValueType(RoleAttributeValueType.RealValue);
            offenceItem.SetRoleAttributeValueType(RoleAttributeValueType.RealValue);
            defenceItem.SetRoleAttributeValueType(RoleAttributeValueType.RealValue);
            speedItem.SetRoleAttributeValueType(RoleAttributeValueType.RealValue);
            criticalItem.SetRoleAttributeValueType(RoleAttributeValueType.Percent);
            dodgeItem.SetRoleAttributeValueType(RoleAttributeValueType.Percent);
            blockItem.SetRoleAttributeValueType(RoleAttributeValueType.Percent);
            hitItem.SetRoleAttributeValueType(RoleAttributeValueType.Percent);

            hpItem.SetTitle(Localization.Get("ui.role_info_view.hp_title"));
            offenceItem.SetTitle(Localization.Get("ui.role_info_view.offence_title"));
            defenceItem.SetTitle(Localization.Get("ui.role_info_view.defence_title"));
            speedItem.SetTitle(Localization.Get("ui.role_info_view.speed_title"));
            criticalItem.SetTitle(Localization.Get("ui.role_info_view.critical_title"));
            dodgeItem.SetTitle(Localization.Get("ui.role_info_view.dodge_title"));
            blockItem.SetTitle(Localization.Get("ui.role_info_view.block_title"));
            hitItem.SetTitle(Localization.Get("ui.role_info_view.hit_title"));

            RefreshModel();
            RefreshAccountInfo();
            RefreshPlayerInfo();
            RefreshAttributes();
            RefreshEquipments();
            RefreshSkillButtons();
        }
Ejemplo n.º 17
0
        void Awake()
        {
            CommonTopBarView view = CommonTopBarView.CreateNewAndAttachTo(panel);

            view.SetAsCommonStyle(Localization.Get("ui.illustration_view.roleFormation"), OnClickCloseBtnHandler, true, true, true, false);
        }
Ejemplo n.º 18
0
        void Awake()
        {
            CommonTopBarView bar = CommonTopBarView.CreateNewAndAttachTo(panel);

            bar.SetAsCommonStyle(Localization.Get("ui.friendView.title"), OnCloseBtnHandler, true, true, true, true);
        }
Ejemplo n.º 19
0
        void Awake()
        {
            CommonTopBarView barView = CommonTopBarView.CreateNewAndAttachTo(core);

            barView.SetAsCommonStyle(Localization.Get("ui.mail_view.title"), OnClickCloseHandler, true, true, true, false);
        }