ํฌํ†ค ๊ธฐ๋ณธ ์˜ˆ์ œ๋ฒ ์ด์Šค๋กœ ๋งŒ๋“ค๊ณ ์žˆ๋Š”๋ฐย 


namespace Photon.Pun.Demo.PunBasics
{
#pragma warning disable 649

/// <summary>
/// Player manager.
/// Handles fire Input and Beams.
/// </summary>
public class PlayerManager : MonoBehaviourPunCallbacks, IPunObservable
{

๋‚ด๋ถ€์—

if(Input.GetKeyDown(KeyCode.B))
{


photonView.RPC("AttackOpponent", RpcTarget.AllBuffered, 10);


}

์ด๋ ‡๊ฒŒ ์จ๋‘๊ณ  ์‹คํ–‰ ์‹œํ‚ค๋ฉด ์ž˜ ์‹คํ–‰๋จ. ํ”Œ๋ ˆ์ด์–ด ๋‘˜๋‹ค.


๊ทผ๋ฐ ๋‚ด๊ฐ€ ์ง์ ‘์“ด ํด๋ž˜์Šค์—์„œ

if (SelectedCardList.Count == 5)
{
PlayerManager.LocalPlayerInstance.GetComponent<PlayerManager>().photonView.RPC("AttackOpponent",PhotonNetwork.CurrentRoom.GetPlayer(2),7 );
PlayerManager.LocalPlayerInstance.GetComponent<PlayerManager>().photonView.RPC("AttackOpponent",PhotonNetwork.CurrentRoom.GetPlayer(1),7 );

์œ„๊ฐ™์ด ์“ฐ๋ฉด ๋กœ์ปฌํ”Œ๋ ˆ์ด์–ด๊ป€ ์—…๋ฐ์ดํŠธ๊ฐ€ ๋˜๋Š”๋ฐย ์ƒ๋Œ€๊บผ๋Š”ย ์—…๋ฐ์ดํŠธ๊ฐ€ ์•ˆ๋˜์š”.


photonView.RPC("AttackOpponent", RpcTarget.OthersBuffered, 10);

OthersBuffered๋กœ ํ•ด๋„ ๋˜‘๊ฐ™์Œ.


์–ด๋–ป๊ฒŒ ํ•ด์•ผ ์™ธ๋ถ€์—์„œ RPC ๋กœ ์ œ์–ด ๊ฐ€๋Šฅํ•œ๊ฐ€์š”?