コード例 #1
0
 protected override void OnCarInstantiated(CarInstantiateSignal carInstantiateSignal)
 {
     if (PhotonNetwork.LocalPlayer.ActorNumber == carInstantiateSignal.OwnerActor)
     {
         SetViewId(_playerChaserFactory.Create().Transform, carInstantiateSignal);
     }
 }
コード例 #2
0
        protected override void OnCarInstantiated(CarInstantiateSignal carInstantiateSignal)
        {
            if (PhotonNetwork.LocalPlayer.ActorNumber == carInstantiateSignal.OwnerActor)
            {
                return;
            }
            Transform carTransform;

            if (carInstantiateSignal.CarType == PlayerType.Runner)
            {
                carTransform = _runnerFactory.Create().Transform;
            }
            else
            {
                carTransform = carInstantiateSignal.Ai ? _aiChaserFactory.Create().Transform : _playerChaserFactory.Create().Transform;
            }
            SetViewId(carTransform, carInstantiateSignal);
        }
コード例 #3
0
 protected void SetViewId(Transform carTransform, CarInstantiateSignal carInstantiateSignal)
 {
     carTransform.position = carInstantiateSignal.Position;
     carTransform.rotation = carInstantiateSignal.Rotation;
     carTransform.GetComponent <PhotonView>().ViewID = carInstantiateSignal.PhotonId;
 }
コード例 #4
0
 protected virtual void OnCarInstantiated(CarInstantiateSignal carInstantiateSignal)
 {
 }