Weapon Switching

+ started weapon switching
+ added only get active weapon (if you have rifle and pistole and you drop rifle you cant scroll to rifle slot)
This commit is contained in:
Noah4ever
2021-11-16 13:05:27 +01:00
parent a8d7a0d26b
commit eaee767535
2 changed files with 38 additions and 18 deletions

View File

@@ -47,11 +47,12 @@ public class Shoot : NetworkBehaviour
if (Input.GetButtonDown("Fire")) {
updateCanvas = true;
Debug.Log(" click");
CmdFireBullet();
if (weapon.AllowAction)
{
shootAnim.Recoil(0.1f);
}
CmdFireBullet();
}
if (Input.GetButtonDown("Reload")) {
updateCanvas = true;