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;
 }
 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;
 }
 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");
 }