using Axibug.Runtime; using UnityEngine; namespace Game { public static class GamePlayEntry { public static ResourcesComponent Resources { get; private set; } public static MainPlayerComponent MainPlayer { get; private set; } public static MapComponent Map { get; private set; } public static RoleMgrComponent RoleMgr { get; private set; } public static LubanComponent Luban { get; set; } //public static RobotMgrComponent RobotMgr //{ // get; // set; //} public static InputComponent Input { get; set; } //public static NetworkComponent Network //{ // get; // set; //} //public static DropMgrComponent DropMgr //{ // get; // set; //} //public static ItemMgrComponent ItemMgr //{ // get; // set; //} //public static EffectMgrComponent EffectMgr //{ // get; // set; //} public static UIMgr UI { get; private set; } public static Tips Tips { get; private set; } //public static TaskComponent Task //{ // get; // private set; //} //public static FindWayComponent FindWay //{ // get; // set; //} //public static AudioComponent Audio //{ // get; // private set; //} //public static TimeManager TimeMgr //{ // get { return TimeManager.Instance; } //} // Start is called before the first frame update public static void Init() { //随便取一个Axibug/Customs下的节点 Transform parent = AppEntry.HotUpdate.transform.parent; Resources = parent.Find("Resources").gameObject.AddComponent(); Input = parent.Find("Input").gameObject.AddComponent(); Map = parent.Find("Map").gameObject.AddComponent(); MainPlayer = parent.Find("MainPlayer").gameObject.AddComponent(); Luban = parent.Find("Luban").gameObject.AddComponent(); RoleMgr = parent.Find("RoleMgr").gameObject.AddComponent(); //Network = parent.Find("Network").gameObject.AddComponent(); //DropMgr = parent.Find("DropMgr").gameObject.AddComponent(); //ItemMgr = parent.Find("ItemMgr").gameObject.AddComponent(); //ItemMgr.Init(); //EffectMgr = parent.Find("EffectMgr").gameObject.AddComponent(); Tips = parent.Find("Tips").gameObject.AddComponent(); //Task = parent.Find("Logic").gameObject.AddComponent(); //FindWay = parent.Find("Logic").gameObject.AddComponent(); //Audio = parent.Find("Audio").gameObject.AddComponent(); GameObject go = Resources.CloneBySync("Assets/GameAssets/Prefabs/UI/UIYYControl/UIMgr.prefab", parent); if (go == null) return; UI = go.GetComponent(); } } }