diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/UICommon/XUIScript.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/UICommon/XUIScript.cs')
-rw-r--r-- | Client/Assets/Scripts/UICommon/XUIScript.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/UICommon/XUIScript.cs b/Client/Assets/Scripts/UICommon/XUIScript.cs new file mode 100644 index 00000000..4886f7e4 --- /dev/null +++ b/Client/Assets/Scripts/UICommon/XUIScript.cs @@ -0,0 +1,31 @@ +using UnityEngine;
+using XUtliPoolLib;
+
+public class XUIScript : MonoBehaviour
+{
+ private IXGameUI _game_ui = null;
+
+ void Awake ()
+ {
+ _game_ui = XInterfaceMgr.singleton.GetInterface<IXGameUI>(XCommon.singleton.XHash("XGameUI"));
+
+ _game_ui.UICamera = gameObject.GetComponent<Camera>();
+
+ Transform uiRoot = transform.parent;
+ _game_ui.UIRoot = uiRoot;
+
+ UIRoot nguiRoot = uiRoot.GetComponent<UIRoot>();
+ _game_ui.Base_UI_Width = nguiRoot.base_ui_width;
+ _game_ui.Base_UI_Height = nguiRoot.base_ui_height;
+
+ XUICommon.singleton.Init(uiRoot);
+ }
+
+ // Use this for initialization
+ void Start () {
+ }
+
+ // Update is called once per frame
+ void Update () {
+ }
+}
|