Exemplo n.º 1
0
        /// <summary>
        /// 範囲ボム弾発射時
        /// </summary>
        public override void OnShoot(BombBullet bullet)
        {
            //自分しかいないのでイベント送信の必要なし
            if (PhotonNetwork.CurrentRoom.PlayerCount == 1)
            {
                return;
            }

            var dto = new BombBulletDto();

            dto.timeStamp              = bullet.timeStamp;
            dto.dropPosition           = BattleGlobal.instance.viewRotation * bullet.dropPosition;
            dto.barrelLocalEulerAngles = this.turretBase.rotationParts.localEulerAngles;

            PhotonNetwork.RaiseEvent(
                (byte)MultiEventCode.ShootBomb,
                dto.GetBinary(),
                RaiseEventOptions.Default,
                SendOptions.SendReliable
                );
        }
Exemplo n.º 2
0
 /// <summary>
 /// 範囲ボム弾発射時
 /// </summary>
 public virtual void OnShoot(BombBullet bullet){}