| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using Core.Language;
- using Fort23.Core;
- namespace Fort23.Mono
- {
- [UIBinding(prefab = "HeroBreakthroughFailPanel")]
- public partial class HeroBreakthroughFailPanel : UIPanel
- {
- private void Init()
- {
- }
- protected override void AddEvent()
- {
- }
- protected override void DelEvent()
- {
- }
- public override void AddButtonEvent()
- {
- Btn_Close.onClick.AddListener(() => { UIManager.Instance.HideUIUIPanel(this); });
- }
- public void CustomInit(int type, int xw)
- {
- if (type == 2)
- {
- Icon_Tu.gameObject.SetActive(true);
- Icon_Dj.gameObject.SetActive(false);
- }
- else if (type == 3)
- {
- Icon_Tu.gameObject.SetActive(false);
- Icon_Dj.gameObject.SetActive(true);
- }
- // //扣除失败后的经验
- // float failbl = xw == 0
- // ? PlayerManager.Instance.myHero.powerUpConfig.FailureExpReduce
- // : (float)(PlayerManager.Instance.myHero.powerUpConfig.FailureExpReduce * xw * 0.01f);
- // int failXw = (int)(PlayerManager.Instance.myHero.powerUpConfig.levelUpExp * failbl * 0.01f);
- Text_Xw.text = LanguageManager.Instance.Text(10792, xw);
- }
- public static async CTask<HeroBreakthroughFailPanel> OpenPanel(int type, int xw)
- {
- HeroBreakthroughFailPanel heroBreakthroughFailPanel =
- await UIManager.Instance.LoadAndOpenPanel<HeroBreakthroughFailPanel>(null, UILayer.Top, isShowBG: true);
- heroBreakthroughFailPanel.CustomInit(type, xw);
- return heroBreakthroughFailPanel;
- }
- }
- }
|