public override void OnJoinedRoom() { base.OnJoinedRoom(); CommonDebug.Log("NetworkManager >> OnJoinedRoom"); GameManager.Instance.CreatePlayer(); }
public void OnGetMessages(string channelName, string[] senders, object[] messages) { CommonDebug.Log($"OnGetMessages >> 채널 : {channelName}, 유저 아이디 : {senders[0]}, 메세지 : {messages[0]}"); if (channelName.Equals(_currentChannel)) { UpdateChatMessage(_currentChannel); } }
public void OnPrivateMessage(string sender, object message, string channelName) { CommonDebug.Log("OnPrivateMessage"); if (channelName.Equals(_currentChannel)) { UpdateChatMessage(_currentChannel); } }
public virtual void OnPhotonRandomJoinFailed() { CommonDebug.Log("OnPhotonRandomJoinFailed >> 새로운 방을 생성합니다."); PhotonNetwork.CreateRoom(null, new RoomOptions() { MaxPlayers = 4 }, null); }
void Disconnect() { if (_chatClient != null) { CommonDebug.Log($"ID : {_userID}, 로그아웃 하였습니다."); _userID = string.Empty; _chatClient.Disconnect(); } _chatClient = null; }
void Connect() { CommonDebug.Log($"ID : {_userID}, 로그인 하였습니다."); _chatClient = new ChatClient(this); #if !UNITY_WEBGL _chatClient.UseBackgroundWorkerForSending = true; #endif _chatClient.Connect(_chatAppSettings.AppId, "1.0", new Photon.Chat.AuthenticationValues(_userID)); }
public void OnSubscribed(string[] channels, bool[] results) { CommonDebug.Log($"OnSubscribed >> 채널명 : {channels[0]}"); // Array로 받지만 한 채널씩 들어옴. foreach (string channel in channels) { // Default 채널을 시작 채널로 설정함 if (channel.Equals(DefaultChannel)) { SetChannel(channel); } } }
public void OnClickBtnLogin() { var inputUserID = _inputFieldID.text.Trim(); if (!string.IsNullOrEmpty(inputUserID)) { ChatManager.Instance.Login(inputUserID); _inputFieldID.text = string.Empty; } else { CommonDebug.Log("로그인 오류! 아이디가 입력되지 않았습니다!"); } }
public void DebugLogSaveData() { for (int i = 0; i < _friendDataKeyList.Count; i++) { string friendKey = _friendDataKeyList[i]; string friendValue = PlayerPrefs.GetString(friendKey); CommonDebug.Log($"PlayerPrefs에 저장된 친구 데이터 >> Key : {friendKey}, Value : {friendValue}"); } for (int i = 0; i < _friendList.Count; i++) { CommonDebug.Log($"저장된 친구 이름 : {_friendList[i]}"); } }
public void DebugReturn(DebugLevel level, string message) { if (level == DebugLevel.ERROR) { CommonDebug.LogError(message); } else if (level == DebugLevel.WARNING) { CommonDebug.LogWarning(message); } else { CommonDebug.Log(message); } }
public void OnConnected() { CommonDebug.Log("OnConnected"); if (_channels == null || _channels.Length == 0) { Debug.LogError("접속할 채널이 없습니다."); return; } _chatClient.Subscribe(_channels); _chatClient.SetOnlineStatus(ChatUserStatus.Online); InitComplete(); _loadingPopup.ClosePopup(); }
public void OnStatusUpdate(string user, int status, bool gotMessage, object message) { CommonDebug.Log($"OnStatusUpdate >> UserID : {user}"); if (status == ChatUserStatus.Online) { _chatUI.AddLoginFriend(user); } else if (status == ChatUserStatus.Offline) { _chatUI.RemoveLoginFriend(user); } else { Debug.LogWarning("온라인, 오프라인 이외의 상태입니다."); } }
public virtual void OnJoinedLobby() { CommonDebug.Log("OnJoinedLobby >> 랜덤 방에 접속을 시도합니다."); PhotonNetwork.JoinRandomRoom(); }
public virtual void OnConnectedToMaster() { CommonDebug.Log("OnConnectedToMaster >> 랜덤 방에 접속을 시도합니다."); PhotonNetwork.JoinRandomRoom(); }
public void OnUnsubscribed(string[] channels) { CommonDebug.Log("OnUnsubscribed"); }
public void OnChatStateChange(ChatState state) { CommonDebug.Log("OnChatStateChange >> state : " + state.ToString()); }
public void OnJoinedRoom() { CommonDebug.Log("OnJoinedRoom"); }
public void OnUserUnsubscribed(string channel, string user) { CommonDebug.Log($"OnUserUnsubscribed >> 채널 : {channel}, 유저 아이디 : {user}"); }
void OnAttack() { CommonDebug.Log("Attack!!!"); }
public void OnDisconnected() { CommonDebug.Log("OnDisconnected"); Logout(); }