mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-30 04:57:10 +01:00
Weapons WORK NOW
Jetzt wirklich
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user