예제 #1
0
 private void SubscribeAllCloseEvents()
 {
     foreach (var e in closeEvents)
     {
         EventManager_Window.Subscribe(e, Close_Handler);
         EventManager_Gameplay.Subscribe(e, Close_Handler);
         EventManager.Subscribe(e, Close_Handler);
     }
 }
예제 #2
0
        protected virtual void Init()
        {
#if UNITY_ANDROID
            EventManager.Subscribe(Events.SocialEvents.DATA_LOADED, DataLoadedFromGoogle);
            EventManager.Subscribe(Events.SocialEvents.SIGNED_IN, UserSignedInGoogle);
#elif UNITY_IOS
            EventManager.Subscribe(Events.SocialEvents.DATA_LOADED, DataLoadedFromGameCenter);
            EventManager.Subscribe(Events.SocialEvents.SIGNED_IN, UserSignedInGameCenter);
#endif

#if (UNITY_IOS || UNITY_ANDROID) && !UNITY_EDITOR
            path = Application.persistentDataPath + "/" + fileName;
#elif UNITY_EDITOR
            path = Application.dataPath + "/" + fileName;
#endif
            LoadLocal();

            Debug.Log(UserData.JsonUD);
        }