Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
| | |
| | | private void UpdateDogzAssistCnt()
|
| | | {
|
| | | m_Controller.m_Scorller.RefreshActiveCellViews();
|
| | | m_DogzAssistCnt.text = StringUtility.Contact(model.GetAssistDogzCount(), "/", model.DogzAssistDefaultCnt);
|
| | | m_DogzAssistCnt.text = Language.Get("TreasurePrivilege_Dogz_1", StringUtility.Contact(model.GetAssistDogzCount(), "/", model.DogzAssistDefaultCnt));
|
| | | UpdateDogzBtn();
|
| | | }
|
| | | private void UpdateDogzBtn()
|
| | | {
|
| | | m_CallBackBtnTxt.text = model.TryGetAssistDogzState(model.presentSelectDogz) ? "召回" : "助战";
|
| | | m_CallBackBtnTxt.text = model.TryGetAssistDogzState(model.presentSelectDogz) ? Language.Get("DogzFunc104") : Language.Get("DogzFunc105");
|
| | | }
|
| | |
|
| | | private void AddAssist()
|
| | | {
|
| | | var _itemConfig = Config.Instance.Get<ItemConfig>(model.AddAssistItem);
|
| | | ConfirmCancel.ShowItemConfirm(string.Format("消耗{0}X{1}永久增加1个助战神兽", _itemConfig.ItemName, model.GetAssistItemCnt()),
|
| | | ConfirmCancel.ShowItemConfirm(Language.Get("DogzFunc102", _itemConfig.ItemName, model.GetAssistItemCnt()),
|
| | | model.AddAssistItem, model.GetAssistItemCnt(), () =>
|
| | | {
|
| | | model.SendBuyAssistCnt();
|
| | |
| | | {
|
| | | dogzModel.GetDogzItemList();
|
| | | ItemModel model = null;
|
| | | if(index < dogzModel.dogzItemList.Count)
|
| | | DebugEx.Log("Display:" + index + "数据长度:" + dogzModel.dogzItemList.Count);
|
| | | if (index < dogzModel.dogzItemList.Count)
|
| | | {
|
| | | model = dogzModel.dogzItemList[index];
|
| | | }
|
| | | if(model == null)
|
| | | |
| | | if (model == null)
|
| | | {
|
| | | itemBaisc.gameObject.SetActive(false);
|
| | | strengthLvTxt.gameObject.SetActive(false);
|
| | | return;
|
| | | }
|
| | |
|
| | | DebugEx.Log("model:"+ model.itemId);
|
| | | int strenLv = 0;
|
| | | if (model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
|
| | | {
|
| | |
| | | {
|
| | | if (TryGetAssistDogzState(presentSelectDogz))
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),"当前神兽助战中,卸下装备无法保持助战状态,确定继续?",
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),Language.Get("DogzFunc103"),
|
| | | (bool isOk)=>
|
| | | {
|
| | | if(isOk)
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"),"背包中没有该部位可穿戴的装备",(bool isOk)=>
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("DogzFunc101"), (bool isOk)=>
|
| | | {
|
| | | if(isOk)
|
| | | {
|
| | |
| | |
|
| | | private void RefreshDogzItemEvent(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.rptDogzItem || !dogzModel.IsReachSelectCondi(id)) return;
|
| | | if (type != PackType.rptDogzItem && type != PackType.rptDogzEquip) return;
|
| | |
|
| | | m_PackController.m_Scorller.RefreshActiveCellViews();
|
| | | }
|
| | |
| | |
|
| | | int cacheRealmPoint = 0;
|
| | | Coroutine cacheCoroutine = null;
|
| | | RuntimeAnimatorController cacheController = null;
|
| | | const string State_EnterHash = "Show";
|
| | | const string State_IdleHash = "Idle";
|
| | |
|
| | |
| | | StopCoroutine(cacheCoroutine);
|
| | | cacheCoroutine = null;
|
| | | }
|
| | | if (cacheController != null)
|
| | | {
|
| | | cacheController = null;
|
| | | }
|
| | | }
|
| | |
|
| | | protected override void OnAfterClose()
|
| | |
| | | IEnumerator Co_DisplayBossShow()
|
| | | {
|
| | | yield return WaitingForSecondConst.WaitMS800;
|
| | | ResetRunTimeController();
|
| | | var config = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | | UI3DModelExhibition.Instance.StopShowPlayer();
|
| | |
| | | {
|
| | | m_RawBoss.gameObject.SetActive(true);
|
| | | m_RawPlayer.gameObject.SetActive(false);
|
| | | ResetRunTimeController();
|
| | | UI3DModelExhibition.Instance.StopShowPlayer();
|
| | | StartBoss(config);
|
| | | }
|
| | |
| | |
|
| | | private void StopBoss()
|
| | | {
|
| | | ResetRunTimeController();
|
| | | UI3DModelExhibition.Instance.StopShowNPC();
|
| | | }
|
| | |
|
| | | private void ResetRunTimeController()
|
| | | {
|
| | | var npcModel = UI3DModelExhibition.Instance.NpcModelPet;
|
| | | if (npcModel != null)
|
| | | {
|
| | | var animator = npcModel.GetComponentInChildren<Animator>();
|
| | | if (animator != null && cacheController != null)
|
| | | {
|
| | | animator.runtimeAnimatorController = cacheController;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | private void StartBoss(RealmConfig config, bool act = false)
|
| | |
| | | var animator = npcModel.GetComponentInChildren<Animator>();
|
| | | if (animator != null)
|
| | | {
|
| | | cacheController = animator.runtimeAnimatorController;
|
| | | var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerRealmSuffix, npcConfig.MODE);
|
| | | animator.runtimeAnimatorController = runtimeController;
|
| | | animator.Play(act ? State_EnterHash : State_IdleHash, 0);
|
| | |
| | |
|
| | | var config = Config.Instance.Get<TreasureConfig>(treasure.id);
|
| | | m_TreasureName.text = config.Name;
|
| | | m_Story.text = config.Story;
|
| | | m_Category.text = Language.Get(string.Concat("GetTreasure_", config.Category));
|
| | | if ((TreasureCategory)config.Category == TreasureCategory.Human)
|
| | | {
|
| | |
| | | {
|
| | | if (soulAchievements[soulId].Contains(_id))
|
| | | {
|
| | | UpdateAchievementRedpoint(_id);
|
| | | UpdateAchievementRedpoint(soulId);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | var animator = model.GetComponent<Animator>();
|
| | | if (animator != null)
|
| | | {
|
| | | ResetRealmBossAnimator(id, animator);
|
| | | animator.enabled = false;
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private static void ResetRealmBossAnimator(int _id, Animator animator)
|
| | | {
|
| | | var configs = Config.Instance.GetAllValues<RealmConfig>();
|
| | | var index = configs.FindIndex((x) =>
|
| | | {
|
| | | return x.BossID == _id;
|
| | | });
|
| | | if (index != -1)
|
| | | {
|
| | | var npcConfig = Config.Instance.Get<NPCConfig>(_id);
|
| | | if (npcConfig != null)
|
| | | {
|
| | | var runtimeController = AnimatorControllerLoader.LoadMobController(AnimatorControllerLoader.controllerSuffix, npcConfig.MODE);
|
| | | if (runtimeController != null)
|
| | | {
|
| | | animator.runtimeAnimatorController = runtimeController;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public static GameObject LoadUIHorse(int id)
|
| | | {
|
| | | var prefab = InstanceResourcesLoader.LoadModelRes(id);
|