Пример #1
0
 public override bool Predicate(WeaponBase weaponBase)
 {
     if (_weaponFist == null)
     {
         _weaponFist = weaponBase as WeaponFist;
     }
     if (_weaponFist == null)
     {
         return(false);
     }
     if (weaponBase.IsPrimaryPressed && _weaponFist.HitTimerCurrent <= .2f)
     {
         return(true);
     }
     return(false);
 }
Пример #2
0
        public void WeaponModuleFistHit()
        {
            if (CurrentWeapon == null)
            {
                return;
            }
            WeaponFist weaponFist = CurrentWeapon as WeaponFist;

            if (weaponFist == null)
            {
                return;
            }

            weaponFist.WeaponFistMono.ActivateCollider();
            //ВЫЗОВ ПОСЛЕ БРЕЙКА, БРЕЙК ПРИ СМЕНЕ СОСТОЯНИЙ!!!!!!!!!!!!!!!
            Debug.Log("Actual FIST!");
        }
Пример #3
0
    public override IWeapon createWeapon(ENUM_Weapon emWeapon)
    {
        IWeapon weapon = null;

        switch (emWeapon)
        {
        case ENUM_Weapon.Fist:
            weapon = new WeaponFist();
            weapon.setWeaponAttr(new WeaponAttr(50, 10, ENUM_Weapon.Fist));
            return(weapon);

        case ENUM_Weapon.AK:
            weapon = new WeaponAK();
            weapon.setWeaponAttr(new WeaponAttr(500, 50, ENUM_Weapon.AK));
            break;

        default:
            return(null);
        }
        weapon.setGameObject(FactoryManager.getAssetFactory().loadWeapon(weapon.getAssetName()));
        weapon.setupEffect();
        return(weapon);
    }