少年修仙传客户端代码仓库
lcy
2024-12-16 a39c35fc6449430cd02bccb681c4a0a880e46cd9
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
98
99
100
101
102
103
104
105
//--------------------------------------------------------
//    [Author]:           Mechanist Games
//    [  Date ]:           Wednesday, August 09, 2017
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using vnxbqy.UI;
 
 
namespace Dmyx.UI
{
 
    public class DebugController : MonoBehaviour
    {
 
        [SerializeField] FPS m_Fps;
        [SerializeField] Toggle m_ToggleFPS;
 
        [SerializeField] DebugVersionShow m_DebugVersion;
        [SerializeField] Toggle m_ToggleVersion;
 
        private void OnEnable()
        {
            if (m_Fps != null)
            {
                m_Fps.SetActive(m_ToggleFPS.isOn);
            }
 
            m_ToggleFPS.RemoveAllListeners();
            m_ToggleFPS.AddListener(ToggleFPS);
 
            if (m_DebugVersion != null)
            {
                m_DebugVersion.SetActive(m_ToggleVersion.isOn);
            }
 
            m_ToggleVersion.RemoveAllListeners();
            m_ToggleVersion.AddListener(ToggleVersion);
        }
 
        void ToggleFPS(bool _value)
        {
            if (m_Fps != null)
            {
                m_Fps.SetActive(_value);
            }
        }
 
        void ToggleVersion(bool _value)
        {
            if (m_DebugVersion != null)
            {
                m_DebugVersion.SetActive(_value);
            }
        }
 
        public void OpenGM()
        {
            if (!WindowCenter.Instance.IsOpen<GMInputWin>())
            {
                WindowCenter.Instance.Open<GMInputWin>();
            }
        }
 
        public void OpenGMCommond()
        {
            WindowCenter.Instance.Open<GMCmdPanel>();
        }
 
        //public void SendSpecialCTG()
        //{
        //    var model = ModelCenter.Instance.GetModel<VipModel>();
        //    var list = model.GetCTGConfigs(VersionConfig.Get().appId);
        //    for (int i = 0; i < list.Count; i++)
        //    {
        //        var config = CTGConfig.Get(list[i]);
        //        if (config.PayType == 4)
        //        {
        //            model.CTG(config.RecordID);
        //            return;
        //        }
        //    }
        //}
 
        public void CleanNewBranchSet()
        {
            LocalSave.DeleteKey("#@#BrancH");
            ScrollTip.ShowTip("清理分支设置");
        }
 
        public void PrintLastCrashLog()
        {
            if (CrashReport.lastReport != null)
            {
                DebugEx.LogFormat("崩溃日志:{0}", CrashReport.lastReport);
            }
        }
 
    }
 
}