mirror of
https://github.com/Leahnaya/TheKingsRace.git
synced 2026-08-25 11:54:33 -05:00
hate sound. fuck
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user