public void ObtenerPlayerAmmo(Transform playerAmmo) { Transform spawnedAmmo = PlayerAmmoQueue.Dequeue(); PlayerAmmo pa = spawnedAmmo.GetComponent <PlayerAmmo>(); pa.SetPlayerAmmo(VelocidadPlayerAmmo, TiempoVidaPlayerAmmo, ValorDañoPlayerAmmo); spawnedAmmo.gameObject.SetActive(true); spawnedAmmo.position = playerAmmo.position + (playerAmmo.forward * 2f); spawnedAmmo.rotation = playerAmmo.rotation; PlayerAmmoQueue.Enqueue(spawnedAmmo); //return spawnedAmmo; }