From a0decdb9ab620ac38cb8254b19eebd5186a5ab58 Mon Sep 17 00:00:00 2001 From: chenxin <chenxin6991@163.com> Date: Sat, 05 Dec 2020 13:33:56 +0800 Subject: [PATCH] 血条移除 --- Assets/Scripts/Manager/ManagerRoot.cs | 32 +++++++++++++++++--------------- 1 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Assets/Scripts/Manager/ManagerRoot.cs b/Assets/Scripts/Manager/ManagerRoot.cs index a020d44..0ab1b30 100644 --- a/Assets/Scripts/Manager/ManagerRoot.cs +++ b/Assets/Scripts/Manager/ManagerRoot.cs @@ -1,6 +1,8 @@ using System; using System.Collections; using System.Collections.Generic; +using Core.Utilities; +using DG.Tweening; using Protobuf; using UnityEngine; @@ -8,24 +10,24 @@ { public class ManagerRoot : MonoBehaviour { - - //private bool canChangeScene = false; - - public void Awake() + void Awake() { - gameObject.AddComponent<DoNotDestory>(); - gameObject.AddComponent<MasterSocket>(); - gameObject.AddComponent<TDAA_SDKManager>(); - gameObject.AddComponent<AudioSourceManager>(); + GameObject root = GameObject.Find("ManagerRoot"); + if (root == null) + { + DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10); - //gameObject.AddComponent<ErrorLogOnGUIMyTools>(); + root = new GameObject("ManagerRoot"); + root.AddComponent<DoNotDestory>(); + root.AddComponent<MasterSocket>(); + root.AddComponent<TDAA_SDKManager>(); + root.AddComponent<AudioSourceManager>(); + root.AddComponent<JsonDataReader>(); + root.AddComponent<JsonDataInit>(); + // root.AddComponent<ErrorLogOnGUIMyTools>(); + } + //gameObject.AddComponent<JsonDataReader>(); - - } - - void Start() - { - AudioSourceManager.Ins.Play(AudioEnum.BGM1); } // public void AfterRead() -- Gitblit v1.9.1