Update PistolComponent.cs
This commit is contained in:
parent
f40c0aa770
commit
28a3f7ddd8
@ -130,19 +130,21 @@ namespace Item
|
||||
Fire(!hasCloseTarget);
|
||||
}
|
||||
[ServerRpc]
|
||||
private GameObject SpawnBullet()
|
||||
private void SpawnBullet(GameObject projectile)
|
||||
{
|
||||
var projectile = Instantiate(projectilePrefab, bulletSpawnPoint);
|
||||
|
||||
|
||||
InstanceFinder.ServerManager.Spawn(projectile);
|
||||
return projectile;
|
||||
|
||||
}
|
||||
|
||||
public void Fire(bool offsetWithTargetBall)
|
||||
{
|
||||
shootLightDuration = 0;
|
||||
shootLight.gameObject.SetActive(true);
|
||||
var projectile = SpawnBullet();
|
||||
|
||||
var projectile = Instantiate(projectilePrefab, bulletSpawnPoint);
|
||||
SpawnBullet(projectile);
|
||||
//var projectile = Instantiate(projectilePrefab, bulletSpawnPoint);
|
||||
|
||||
//InstanceFinder.ServerManager.Spawn(projectile);
|
||||
|
Reference in New Issue
Block a user