mirror of
https://github.com/DerTyp7/defrain-shooter-unity.git
synced 2025-10-30 04:57:10 +01:00
Grenades
Fixed some issues. Grenades work now.
This commit is contained in:
@@ -79,6 +79,7 @@ public class Shoot : NetworkBehaviour
|
||||
// Throws grenade with dropForce
|
||||
weapon.HasBeenThrown = true;
|
||||
weaponManager.dropWeapon(weapon.DropForce);
|
||||
weaponManager.switchWeapon(1);
|
||||
}
|
||||
|
||||
[Command]
|
||||
@@ -138,6 +139,7 @@ public class Shoot : NetworkBehaviour
|
||||
}
|
||||
|
||||
public bool setWeapon(GameObject newWeapon) {
|
||||
Debug.Log("Switch weapon to: " + newWeapon.transform.name);
|
||||
weapon = newWeapon.GetComponent<Weapon>();
|
||||
curAmmo = weapon.CurrentAmmunition;
|
||||
totalAmmo = weapon.TotalAmmunition;
|
||||
|
||||
Reference in New Issue
Block a user