Esempio n. 1
0
    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;
    }
Esempio n. 2
0
 public void SetWeapon(WeaponBehaviour weapon)
 {
     _weapon = weapon;
 }
Esempio n. 3
0
 public void setWeapon(WeaponBehaviour w)
 {
     this.weapon = w;
 }
 override public void Init()
 {
     base.Init();
     weaponBehaviour = new WeaponBehaviour(Muzzles, BulletPrefab, WeaponData, new AutoFireInput(), this);
 }