public RPC ( string methodName, PhotonPlayer, targetPlayer ) : void | ||
methodName | string | The name of a fitting method that was has the RPC attribute. |
targetPlayer | PhotonPlayer, | The group of targets and the way the RPC gets sent. |
return | void |
public void RPC(string methodName, PhotonPlayer targetPlayer, params object[] parameters)
{
PhotonNetwork.RPC(this, methodName, targetPlayer, false, parameters);
}
PhotonView::RPC ( string methodName, PhotonTargets target ) : void |
public void Damage(float damage) { if (Currenthealth - damage <= 0) { DieEvent?.Invoke(); } else { PhotonView?.RPC("DamageRPC", RpcTarget.All, damage); } }