Esempio n. 1
0
 public void Process(float deltaTime)
 {
     if (ProcessRecycle(false))
     {
         GameApp.Instance().UnloadUnusedAsset();
     }
 }
Esempio n. 2
0
 void OnEventCallBack(int nEventID, object param)
 {
     if (nEventID == (int)Client.GameEventID.ENTITYSYSTEM_LEAVEMAP)
     {
         GameApp.Instance().OnLowMemoryWarning();
     }
 }
Esempio n. 3
0
 public void DoLoad()
 {
     DataManager.Manager <UIPanelManager>().ShowLoading(progress: 0);
     DataManager.Manager <UIManager>().ChangeUISceneState(UIManager.UISceneState.USS_Ingame);
     // 创建Camera
     GameApp.Instance().CreateMainCamera(true);
     CoroutineMgr.Instance.DelayInvokeMethod(0.1f, DoLoading);
 }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        string     strRootName = transform.gameObject.name;
        GameObject root        = transform.gameObject;

        m_RareApp = GameApp.Instance();
#if UNITY_ANDROID && !UNITY_EDITOR
        MethodInfo mi = mainType.GetMethod("Init");
        mi.Invoke(m_RareApp, new object[] { root });
#else
        m_RareApp.Init(ref root);
#endif
        if (Application.isEditor)
        {
            //  root.AddComponent<NetDataMonitor>();
        }
        Engine.Utility.EventEngine.Instance().AddEventListener((int)Client.GameEventID.ENTITYSYSTEM_LEAVEMAP, OnEventCallBack);
    }
Esempio n. 5
0
 /// <summary>
 /// 释放没有使用的资源
 /// </summary>
 private void DoLowMemory()
 {
     DataManager.Manager <CMResourceMgr>().OnLowMemory();
     GameApp.Instance().UnloadUnusedAsset(true);
 }
Esempio n. 6
0
 void onClick_LowMemory_Btn(GameObject caster)
 {
     GameApp.Instance().OnLowMemoryWarning();
 }