标签:关闭 except 成功 disco response evel exception prot level
using UnityEngine;
using System.Collections;
using ExitGames.Client.Photon;
public class GameClinet : MonoBehaviour,IPhotonPeerListener {
PhotonPeer peer;
// Use this for initialization
void Start ()
{
peer = new PhotonPeer(this, ConnectionProtocol.Udp);
peer.Connect("127.0.0.1:5055", "Lite");
}
// Update is called once per frame
void Update () {
peer.Service();
}
public void DebugReturn(DebugLevel level, string message)
{
throw new System.NotImplementedException();
}
public void OnEvent(EventData eventData)
{
throw new System.NotImplementedException();
}
public void OnOperationResponse(OperationResponse operationResponse)
{
throw new System.NotImplementedException();
}
public void OnStatusChanged(StatusCode statusCode)
{
switch(statusCode)
{
case StatusCode.Connect:
Debug.Log("连接成功");
break;
case StatusCode.Disconnect:
Debug.Log("关闭连接");
break;
case StatusCode.ExceptionOnConnect:
Debug.Log("连接异常");
break;
}
}
}
标签:关闭 except 成功 disco response evel exception prot level
原文地址:http://www.cnblogs.com/ylllove/p/6088376.html