Exemplo n.º 1
0
 protected override void Awake()
 {
     base.Awake();
     DontDestroyOnLoad(this.gameObject);
     this.currentUser = new CUserData();
     // SET UP CONNECT
     this.m_SocketIO.url         = CTaskUtil.SOCKET_HOST;
     this.m_SocketIO.autoConnect = false;
 }
Exemplo n.º 2
0
 public virtual void OnClientRegisterCompleted(CUserData user)
 {
     if (this.OnEventRegisterCompleted != null)
     {
         this.OnEventRegisterCompleted(user);
     }
     // TRY CONNECT TO SERVER
     this.OnClientConnectServer();
     // SAVE USER DATA
     CTaskUtil.Set(CTaskUtil.USER_DATA, user);
     // LOGGED IN
     this.m_LogedIn = true;
 }
Exemplo n.º 3
0
 public virtual void OnClientLoginCompleted(CUserData user)
 {
     Debug.LogWarning("OnClientLoginCompleted USER " + user.userName + " PASSWORD " + user.userPassword);
     if (this.OnEventLoginCompleted != null)
     {
         this.OnEventLoginCompleted(user);
     }
     // TRY CONNECT TO SERVER
     this.OnClientConnectServer();
     // SAVE USER DATA
     CTaskUtil.Set(CTaskUtil.USER_DATA, user);
     // LOGGED IN
     this.m_LogedIn = true;
     PlayerPrefs.SetString(CTaskUtil.USER_STATE, "LOGGED_IN");
 }