chenxin
2020-12-25 adb0dae8a82a7eabb4e686bc0e83c8859bf6445f
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
using System;
using System.Collections;
using System.Collections.Generic;
using Core.Utilities;
using DG.Tweening;
using Protobuf;
using UnityEngine;
 
namespace KTGMGemClient
{
    public class ManagerRoot : MonoBehaviour
    {
        void Awake()
        {
            GameObject root = GameObject.Find("ManagerRoot");
            if (root == null)
            {
                if (Application.platform == RuntimePlatform.WindowsEditor ||
            Application.platform == RuntimePlatform.WindowsPlayer)
                {
                    GameConfig.useSDK = false;
                    GameConfig.OpenDebug = true;
 
                }
                Application.targetFrameRate = 60;
                //Debug.Log("设置了帧数为60");
                DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10);
 
                root = new GameObject("ManagerRoot");
                // if (GameConfig.useSDK)
                //     root.AddComponent<SDKCallBack>();
                root.AddComponent<DoNotDestory>();
                root.AddComponent<MasterSocket>();
                root.AddComponent<TDAA_SDKManager>();
                root.AddComponent<AudioSourceManager>();
                root.AddComponent<JsonDataReader>();
                root.AddComponent<JsonDataInit>();
                root.AddComponent<LanguageManager>();
                // root.AddComponent<ErrorLogOnGUIMyTools>();
            }
 
            //gameObject.AddComponent<JsonDataReader>();
        }
 
        // public void AfterRead()
        // {
        //     JsonDataReader.Instance.StartRead(() =>
        //     {
        //         StartCoroutine(CloseUpdateCanvas());
        //     });
 
        // }
 
        // IEnumerator CloseUpdateCanvas()
        // {
        //     yield return new WaitForSeconds(1f);
        //     canChangeScene = true;
        //     //gameObject.AddComponent<GameEnter>();
        //     yield return new WaitForSeconds(1f);
        //     GameObject.Find("Canvas").SetActive(false);
 
        // }
 
        // private void OnGUI()
        // {
        //     // if (canChangeScene)
        //     // {
        //     //     GUILayout.BeginArea(new Rect(5, 460, 150, 300));
        //     //     if (GUILayout.Button("GM", GUILayout.Width(150), GUILayout.Height(70)))
        //     //     {
        //     //         //UIManager.Instance.ShowWind("GmWin");
        //     //     }
 
        //     //     GUILayout.EndArea();
        //     // }
        // }
    }
}