void BeginConnet() { try { // 同步连接 //LogMgr.Log("NewAddress:"+newHostname); //LogMgr.Log("NewAddress:"+newPort); //LogMgr.Log("NewAddressFamily:"+newAddressFamily.ToString()); if (m_connector != null) { m_connector.Abort(); m_connector = null; } m_tcpClient = new TcpClient(newAddressFamily); m_connector = new ConnectThread(m_tcpClient, newHostname, newPort, 5f); if (m_connector != null) { m_connector.Run(); } } catch (SocketException ex) { //LogMgr.LogError("SocketException:"+ex.Message); LogMgr.UnityWarning("_ConnectAsyncWithIp: exception " + ex.Message); // 异常的网络事件,发送断线重连事件 onError(ex.ErrorCode); } }
public void CastSkill(int skillId) { if (InCDCoolState(skillId) == true) { return; } LogMgr.UnityWarning("CastSkill:" + skillId); EventParameter parameter = EventParameter.Get(); parameter.intParameter = skillId; parameter.goParameter = CoreEntry.gActorMgr.MainPlayer.gameObject; m_EventMgr.TriggerEvent(GameEvent.GE_NOTIFY_CAST_SKILL, parameter); if (CoreEntry.GameStart == false) { if (gameStartCount > 2) { CoreEntry.GameStart = true; gameStartCount = 0; } else { gameStartCount++; } } }
public void SetBindNode(GameObject owner, string name) { if (owner == null) { return; } Owner = owner; BindNode = Owner.transform.Find(name); if (BindNode == null) { LogMgr.UnityWarning(string.Format("{0} has no child {1}. Use self instead.", Owner.name, name)); BindNode = Owner.transform; } UpdatePosition(); }
private void syncConnect(IPAddress add, int port) { try { // 同步连接 m_tcpClient.Connect(add, port); if (!m_tcpClient.Connected) { PrepareToConnect(); } else { connectOK(); } } catch (SocketException ex) { LogMgr.UnityWarning("_ConnectAsyncWithIp: exception " + ex.Message); onError(ex.ErrorCode); } }
public void SetLightState(int questType) { LogMgr.UnityWarning("TaskCheckScrollBar.SetLightState 已废弃"); }