示例#1
0
    private void Modify()
    {
        WeaponFunction component = GetComponent <WeaponFunction>();

        if (null != component)
        {
            WpnMod wpnMod = WeaponModifier.Instance.Get((int)component.weaponBy);
            if (wpnMod != null)
            {
                maxAmmo       = wpnMod.maxAmmo;
                explosionTime = wpnMod.explosionTime;
                speedFactor   = wpnMod.fSpeedFactor;
                AtkPow        = wpnMod.fAtkPow;
                Rigidity      = wpnMod.fRigidity;
                throwForce    = wpnMod.fThrowForce;
                Radius        = wpnMod.radius;
            }
            WpnModEx ex = WeaponModifier.Instance.GetEx((int)component.weaponBy);
            if (ex != null)
            {
                persistTime = ex.persistTime;
            }
            TWeapon tWeapon = (TWeapon)GetComponent <Weapon>().tItem;
            Item    item    = MyInfoManager.Instance.GetItemBySequence(component.ItemSeq);
            if (item == null)
            {
                item = MyInfoManager.Instance.GetUsingEquipByCode(tWeapon.code);
            }
            if (item != null)
            {
                int num   = 0;
                int grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    AtkPow += value;
                }
                num   = 6;
                grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value2 = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    throwForce += value2;
                }
                num   = 7;
                grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value3 = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    Radius += value3;
                }
            }
        }
    }
示例#2
0
    private void Modify()
    {
        WeaponFunction component = GetComponent <WeaponFunction>();

        if (null != component)
        {
            WpnMod wpnMod = WeaponModifier.Instance.Get((int)component.weaponBy);
            if (wpnMod != null)
            {
                reloadSpeed    = wpnMod.fReloadSpeed;
                drawSpeed      = wpnMod.fDrawSpeed;
                range          = wpnMod.fRange;
                effectiveRange = wpnMod.effectiveRange;
                brokenRatio    = wpnMod.brokenRatio;
            }
        }
    }
 private void Modify()
 {
     if (RoomManager.Instance.CurrentRoomType != Room.ROOM_TYPE.BUNGEE)
     {
         WeaponFunction component = GetComponent <WeaponFunction>();
         if (null != component)
         {
             WpnMod wpnMod = WeaponModifier.Instance.Get((int)component.weaponBy);
             if (wpnMod != null)
             {
                 maxAmmo       = wpnMod.maxAmmo;
                 explosionTime = wpnMod.explosionTime;
                 speedFactor   = wpnMod.fSpeedFactor;
                 throwForce    = wpnMod.fThrowForce;
             }
             WpnModEx ex = WeaponModifier.Instance.GetEx((int)component.weaponBy);
             if (ex != null)
             {
                 persistTime = ex.persistTime;
             }
             TWeapon tWeapon = (TWeapon)GetComponent <Weapon>().tItem;
             Item    item    = MyInfoManager.Instance.GetItemBySequence(component.ItemSeq);
             if (item == null)
             {
                 item = MyInfoManager.Instance.GetUsingEquipByCode(tWeapon.code);
             }
             if (item != null)
             {
                 int num   = 0;
                 int grade = item.upgradeProps[num].grade;
                 if (grade > 0)
                 {
                     float value = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                     throwForce += value;
                 }
                 num   = 8;
                 grade = item.upgradeProps[num].grade;
                 if (grade > 0)
                 {
                     float num2 = persistTime = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                 }
             }
         }
     }
 }
示例#4
0
    private void Modify()
    {
        WeaponFunction component = GetComponent <WeaponFunction>();

        if (null != component)
        {
            WpnMod wpnMod = WeaponModifier.Instance.Get((int)component.weaponBy);
            if (wpnMod != null)
            {
                accuracy.accuracy             = wpnMod.fZAccuracy;
                accuracy.accurateMin          = wpnMod.fZAccurateMin;
                accuracy.accurateMax          = wpnMod.fZAccurateMax;
                accuracy.inaccurateMin        = wpnMod.fZInaccurateMin;
                accuracy.inaccurateMax        = wpnMod.fZInaccurateMax;
                accuracy.accurateSpread       = wpnMod.fZAccurateSpread;
                accuracy.accurateCenter       = wpnMod.fZAccurateCenter;
                accuracy.inaccurateSpread     = wpnMod.fZInaccurateSpread;
                accuracy.inaccurateCenter     = wpnMod.fZInaccurateCenter;
                accuracy.moveInaccuracyFactor = wpnMod.fZMoveInaccuracyFactor;
                fov      = wpnMod.fZFov;
                camSpeed = wpnMod.fZCamSpeed;
            }
            TWeapon tWeapon = (TWeapon)GetComponent <Weapon>().tItem;
            Item    item    = MyInfoManager.Instance.GetItemBySequence(component.ItemSeq);
            if (item == null)
            {
                item = MyInfoManager.Instance.GetUsingEquipByCode(tWeapon.code);
            }
            if (item != null)
            {
                int num   = 1;
                int grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    accuracy.accuracy += value;
                }
            }
        }
    }
    private void Modify()
    {
        WeaponFunction component = GetComponent <WeaponFunction>();

        if (null != component)
        {
            WpnMod wpnMod = WeaponModifier.Instance.Get((int)component.weaponBy);
            if (wpnMod != null)
            {
                speedFactor = wpnMod.fSpeedFactor;
                AtkPow      = wpnMod.fAtkPow;
                Rigidity    = wpnMod.fRigidity;
                slashSpeed  = wpnMod.fSlashSpeed;
            }
            TWeapon tWeapon = (TWeapon)GetComponent <Weapon>().tItem;
            Item    item    = MyInfoManager.Instance.GetItemBySequence(component.ItemSeq);
            if (item == null)
            {
                item = MyInfoManager.Instance.GetUsingEquipByCode(tWeapon.code);
            }
            if (item != null)
            {
                int num   = 0;
                int grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    AtkPow += value;
                }
                num   = 5;
                grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value2 = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    slashSpeed += value2;
                }
            }
        }
    }