hate sound. fuck

This commit is contained in:
Vladdie
2022-04-29 16:42:05 -05:00
parent 1ca5579caf
commit 0896918100
11 changed files with 189 additions and 11 deletions

View File

@@ -24,8 +24,11 @@ public class Archer : NetworkBehaviour
public Transform ArrowPrefab;
public Transform firePoint;
public AudioSource fireSound;
private GameObject arrowInScene;
// Start is called before the first frame update
void Start() {
// Only the host should update targetting
@@ -92,6 +95,7 @@ public class Archer : NetworkBehaviour
if (target != null && shootingCooldown <= 0f) {
Vector3 position = target.position;
ShootArrowServerRPC(position);
fireSound.Play();
shootingCooldown = 1f/ fireRate;
}

View File

@@ -12,6 +12,8 @@ public class Arrow : NetworkBehaviour {
[SerializeField] private float bumpPower = 30;
//finds targed
public void Seek(UnityEngine.Vector3 _target) {
//can also do effects, speed on the bullet, damage amount, etc.