Weapons WORK NOW

Jetzt wirklich
This commit is contained in:
Noah4ever
2021-11-25 12:45:55 +01:00
parent 859dda5899
commit 20080a4dd5
6 changed files with 169 additions and 202 deletions

View File

@@ -119,6 +119,14 @@ public class Shoot : NetworkBehaviour
return false;
}
public bool setWeapon(GameObject newWeapon) {
Debug.Log("SetWeapon: " + newWeapon);
weapon = newWeapon.GetComponent<Weapon>();
curAmmo = weapon.CurrentAmmunition;
totalAmmo = weapon.TotalAmmunition;
muzzle = weapon.BulletExit;
return true;
}
private bool reloadWeapon(Weapon weapon) { // Reloads Ammunition from weapon
if (weapon.AllowAction && weapon.TotalAmmunition > 0) {
weapon.AllowAction = false;