本文整理汇总了C#中PhotonTargets.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# PhotonTargets.ToString方法的具体用法?C# PhotonTargets.ToString怎么用?C# PhotonTargets.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhotonTargets
的用法示例。
在下文中一共展示了PhotonTargets.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PhotonRpcSendFsmEvent
/// <summary>
/// Function typically called from the action "PhotonViewRpcBroadcastFsmEvent" that use RPC to send information about the event to Send to self over the network
/// </summary>
/// <param name='target'>
/// Photon Target.
/// </param>
/// <param name='globalEventName'>
/// Global Fsm event name to send using the photon target rule.
/// </param>
public void PhotonRpcSendFsmEvent(PhotonTargets target,string globalEventName)
{
if (LogMessageInfo)
{
Debug.Log("RPC to send global Fsm Event:"+globalEventName+" to self, with network target:"+target.ToString());
}
photonView.RPC("rpc", target, globalEventName);// method name used to be too long : "RPC_PhotonRpcBroadcastFsmEvent"
}
示例2: PhotonRpcBroacastFsmEventWithString
/// <summary>
/// Function typically called from the action "PhotonViewRpcBroadcasFsmEvent" that use RPC to send information about the event to broadcast
/// </summary>
/// <param name='target'>
/// Photon Target.
/// </param>
/// <param name='globalEventName'>
/// Global Fsm event name to broadcast using the photon target rule.
/// </param>
/// <param name='stringData'>
/// String data to pass with this event. WARNING: this is not supposed to be (nor efficient) a way to synchronize data. This is simply to comply with
/// the ability for FsmEvent to include data.
/// </param>
public void PhotonRpcBroacastFsmEventWithString(PhotonTargets target,string globalEventName,string stringData)
{
if (LogMessageInfo)
{
Debug.Log("RPC to send string:"+stringData+" with global Fsm Event:"+globalEventName+" to target:"+target.ToString());
}
photonView.RPC("rpc_s", target, globalEventName, stringData);// method name used to be too long : "RPC_FsmPhotonRpcBroadcastFsmEventWithString"
}