Update PistolComponent.cs

This commit is contained in:
sebastianhampel1 2023-06-15 12:49:37 -04:00
parent 28a3f7ddd8
commit 0779b443ff

View File

@ -48,14 +48,14 @@ namespace Item
private GameObject targetObject;
private float timeSinceLightDuration;
public bool IsLightOn => targetingLight.gameObject.activeSelf;
//private Dictionary<int,float> projectiles = new Dictionary<int, float>();
// Start is called before the first frame update
private void Start()
{
}
// Update is called once per frame
@ -132,21 +132,20 @@ namespace Item
[ServerRpc]
private void SpawnBullet(GameObject projectile)
{
InstanceFinder.ServerManager.Spawn(projectile);
}
public void Fire(bool offsetWithTargetBall)
{
shootLightDuration = 0;
shootLight.gameObject.SetActive(true);
var projectile = Instantiate(projectilePrefab, bulletSpawnPoint);
SpawnBullet(projectile);
//var projectile = Instantiate(projectilePrefab, bulletSpawnPoint);
//InstanceFinder.ServerManager.Spawn(projectile);