| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using UnityEngine;
- namespace ETModel
- {
- public static class Game
- {
- private static EventSystem eventSystem;
- public static EventSystem EventSystem
- {
- get
- {
- return eventSystem ?? (eventSystem = new EventSystem());
- }
- }
-
- private static Scene scene;
- public static Scene Scene
- {
- get
- {
- if (scene != null)
- {
- return scene;
- }
- scene = new Scene() { Name = "ClientM" };
- return scene;
- }
- }
- private static ObjectPool objectPool;
- public static ObjectPool ObjectPool
- {
- get
- {
- if (objectPool != null)
- {
- return objectPool;
- }
- objectPool = new ObjectPool() { Name = "ClientM" };
- return objectPool;
- }
- }
- private static Hotfix hotfix;
- public static Hotfix Hotfix
- {
- get
- {
- return hotfix ?? (hotfix = new Hotfix());
- }
- }
- public static void Close()
- {
- eventSystem = null;
-
- scene?.Dispose();
- scene = null;
-
- objectPool?.Dispose();
- objectPool = null;
-
- hotfix = null;
- }
- }
- }
|