Multiplayer Shooting Support
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.VFX;
|
||||
using FishNet.Object;
|
||||
using FishNet;
|
||||
|
||||
namespace Item
|
||||
{
|
||||
public class PistolComponent : MonoBehaviour
|
||||
public class PistolComponent : NetworkBehaviour
|
||||
{
|
||||
public enum AimMode
|
||||
{
|
||||
@ -130,7 +132,10 @@ namespace Item
|
||||
{
|
||||
shootLightDuration = 0;
|
||||
shootLight.gameObject.SetActive(true);
|
||||
|
||||
var projectile = Instantiate(projectilePrefab, bulletSpawnPoint);
|
||||
InstanceFinder.ServerManager.Spawn(projectile);
|
||||
|
||||
projectile.transform.localPosition = Vector3.zero;
|
||||
projectile.transform.localEulerAngles = Vector3.zero;
|
||||
projectile.transform.localScale = Vector3.one;
|
||||
|
Reference in New Issue
Block a user