IEnumerator ClearCanvas() { yield return(new WaitForSeconds(3.0f)); laser.SetActive(true); clearCanv.SetActive(true); PlayerMove.enabled = false; playerShot.doBomb(); }
// Update is called once per frame void FixedUpdate() { if (photonView.IsMine) { ctrl(); updateInput(); flight_anim(); shot(); photonView.RPC("shot", RpcTarget.Others); // RPC 상대Pc의 내 아바타에게 해당 함수의 실행을 전달 } else // 상대 아바타 { Vector3 pos = Vector3.Lerp(tr.position, currPos, Time.deltaTime * 5.0f); Quaternion rot = Quaternion.Slerp(tr.rotation, currRot, Time.deltaTime * 5.0f); tr.position = pos; tr.rotation = rot; if (onFire_other) { myAudio.clip = P_attack; myAudio.Play(); if (!Shot.isPlaying) { Shot.Play(); } playerShot.shotEnable(); } else { if (Shot.isPlaying) { Shot.Stop(); } playerShot.shotDisable(); } if (onBomb_other) { playerShot.doBomb(); } } }