少年修仙传客户端代码仓库
hch
2025-06-12 204ef05a831c9484e2abc561d27ecbff7c797453
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
using System;
using UnityEngine;
using UnityEngine.UI;
 
 
namespace vnxbqy.UI
{
    
    public class CrossServerWin : OneLevelWin
    {
        private FunctionButton gszcbtn;
        protected override void AddListeners()
        {
            base.AddListeners();
            SetFunctionListener(0, ClickArenaFunc);
            SetFunctionListener(1, ClickBossFunc);
            SetFunctionListener(2, ClickMHBoss);
            SetFunctionListener(3, ClickBattleField);
            SetFunctionListener(4, ClickFamilyBattle);
        }
 
        protected override void OnAfterOpen()
        {
            base.OnAfterOpen();
            gszcbtn = m_Group.GetFunctionBtn(3);
            if (TimeUtility.OpenDay < GeneralDefine.crossServerBattleFieldOpenDay)
            { 
                gszcbtn.state = TitleBtnState.Locked;
                gszcbtn.OnPointClickLockFunc -= Gszcbtn_OnPointClickLockFunc;
                gszcbtn.OnPointClickLockFunc += Gszcbtn_OnPointClickLockFunc;
            }
 
        }
 
        private void Gszcbtn_OnPointClickLockFunc(string obj)
        {
            var mapName = UIHelper.AppendColor(TextColType.Green, MapConfig.Get(GeneralDefine.CrossBattleFieldMapID).Name);
            SysNotifyMgr.Instance.ShowTip("ImpactRankActivityUnOpen", mapName, GeneralDefine.crossServerBattleFieldOpenDay + 1);
        }
 
        private void ClickBossFunc()
        {
            CloseSubWindows();
            WindowCenter.Instance.Open<CrossServerBossWin>();
            functionOrder = 1;
        }
 
        private void ClickArenaFunc()
        {
            if (TimeUtility.OpenDay < GeneralDefine.crossServerOneVsOneOpenDay)
            {
                SysNotifyMgr.Instance.ShowTip("CrossMatching15", GeneralDefine.crossServerOneVsOneOpenDay);
                ClickBossFunc();
                return;
            }
 
            CloseSubWindows();
            WindowCenter.Instance.Open<CrossServerOneVsOneWin>();
            functionOrder = 0;
        }
 
        private void ClickMHBoss()
        {
            CloseSubWindows();
            WindowCenter.Instance.Open("CrossServerMHBossWin");
            functionOrder = 2;
        }
 
        private void ClickBattleField()
        {
            if (TimeUtility.OpenDay < GeneralDefine.crossServerBattleFieldOpenDay)
            {
                var mapName = UIHelper.AppendColor(TextColType.Green, MapConfig.Get(GeneralDefine.CrossBattleFieldMapID).Name);
                SysNotifyMgr.Instance.ShowTip("ImpactRankActivityUnOpen", mapName, GeneralDefine.crossServerBattleFieldOpenDay + 1);
                return;
            }
            CloseSubWindows();
            WindowCenter.Instance.Open("CrossServerGodBattleFieldWin");
            functionOrder = 3;
        }
 
        private void ClickTimeBoss()
        {
            CloseSubWindows();
            WindowCenter.Instance.Open("CrossServerTimeBossWin");
            functionOrder = 5;
        }
 
 
        private void ClickFamilyBattle()
        {
            CloseSubWindows();
            WindowCenter.Instance.Open("CrossServerFamilyBattleWin");
            functionOrder = 4;
        }
    }
}