| | |
| | |
|
| | | private void OnGet()
|
| | | {
|
| | | treasure.specialData.GetReward();
|
| | | special.GetReward();
|
| | | }
|
| | |
|
| | | private void OnGoto()
|
| | | {
|
| | | var specialData = treasure.specialData;
|
| | | switch (specialData.type)
|
| | | switch (special.type)
|
| | | {
|
| | | case TreasurePrivilege.DemonJarAtk:
|
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.LootPreciousFrameFunc1);
|
| | |
| | | WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.PetFunc2);
|
| | | break;
|
| | | }
|
| | | model.gotoSoul = treasure.id;
|
| | | model.gotoSoul = (int)special.type;
|
| | | }
|
| | |
|
| | | public override void Display(int _id)
|
| | | {
|
| | | base.Display(_id);
|
| | | var specialData = treasure.specialData;
|
| | | switch (specialData.type)
|
| | | switch (special.type)
|
| | | {
|
| | | case TreasurePrivilege.DemonJarAtk:
|
| | | m_ProgressTitle.text = Language.Get("TreasurePrivilege_DemonJar");
|
| | |
| | |
|
| | | private void Display()
|
| | | {
|
| | | var specialData = treasure.specialData;
|
| | | m_Get.gameObject.SetActive(false);
|
| | | m_Goto.gameObject.SetActive(false);
|
| | | for (int i = 0; i < properties.Count; i++)
|
| | | {
|
| | | properties[i].gameObject.SetActive(false);
|
| | | }
|
| | | switch (specialData.type)
|
| | | switch (special.type)
|
| | | {
|
| | | case TreasurePrivilege.DemonJarAtk:
|
| | | case TreasurePrivilege.Boss:
|
| | |
| | | var _index = 0;
|
| | | m_ContainerHas.gameObject.SetActive(true);
|
| | | m_ContainerNone.gameObject.SetActive(false);
|
| | | foreach (var _key in specialData.propertyDict.Keys)
|
| | | foreach (var _key in special.propertyDict.Keys)
|
| | | {
|
| | | var _value = specialData.propertyDict[_key] * specialData.presentFinishCount / specialData.progress;
|
| | | var _value = special.propertyDict[_key] * special.presentFinishCount / special.progress;
|
| | | if (_value <= 0)
|
| | | {
|
| | | m_ContainerHas.gameObject.SetActive(false);
|
| | |
| | | properties[_index].DisplayUpper(_key, _value);
|
| | | _index++;
|
| | | }
|
| | | m_Get.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Reward);
|
| | | m_Goto.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Doing);
|
| | | m_Progress.text = specialData.ProgressDisplay();
|
| | | m_Get.gameObject.SetActive(special.state == TreasurePrivilegeState.Reward);
|
| | | m_Goto.gameObject.SetActive(special.state == TreasurePrivilegeState.Doing);
|
| | | m_Progress.text = special.ProgressDisplay();
|
| | | //m_Progress.color = specialData.state == TreasurePrivilegeState.Doing ? UIHelper.GetUIColor(TextColType.Red, true) : UIHelper.GetUIColor(TextColType.Green, true);
|
| | | m_Complete.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Complete);
|
| | | m_Complete.gameObject.SetActive(special.state == TreasurePrivilegeState.Complete);
|
| | | break;
|
| | | }
|
| | | }
|
| | |
| | | protected override void TreasurePrivilegeUpdateEvent(int _id)
|
| | | {
|
| | | base.TreasurePrivilegeUpdateEvent(_id);
|
| | | if (_id == (int)treasure.specialData.type)
|
| | | if (_id == (int)special.type)
|
| | | {
|
| | | Display();
|
| | | }
|