void SwapWeapon(Weapon w) { switch(w) { case Weapon.Hookshot: if (!CheckWeaponIsSetUp(weaponConfig.hookshot)) return; mainWeapon = Hookshot; break; case Weapon.None: mainWeapon = None; break; case Weapon.Rocket: if (!CheckWeaponIsSetUp(weaponConfig.rocket)) return; mainWeapon = Rocket; break; default: Debug.LogWarning("Weapon not recognized, see SwapWeapon() in PlayerWeapon.cs"); return; } // Assigned if not Returned in Switch equippedPrimary = w; }
public void SetWeapon(WeaponBehaviour weapon) { _weapon = weapon; }
public void setWeapon(WeaponBehaviour w) { this.weapon = w; }
override public void Init() { base.Init(); weaponBehaviour = new WeaponBehaviour(Muzzles, BulletPrefab, WeaponData, new AutoFireInput(), this); }