示例#1
0
 void Awake()
 {
     api = StardomAPI.Instance;
     api.RegisterDisconnectHandler(delegate
     {
         Debug.Log("Disconnected, user disconnected");
     });
 }
示例#2
0
 void Awake()
 {
     api = StardomAPI.Instance;
     api.RegisterDisconnectHandler(delegate
     {
         Debug.Log("Disconnected");
         if (apiInitDone)
         {
             api.GetUserProfile(UserProfileCallback);
         }
     });
 }
示例#3
0
 void OnLevelWasLoaded(int level)
 {
     //prevent multiple instances of singleton and force it presist through all levels
     if (instance == null)
     {
         instance = this;
     }
     if (this != instance)
     {
         Destroy(this);
     }
     else
     {
         DontDestroyOnLoad(this);
     }
 }