Exemplo n.º 1
0
        private void SetComboHitByWeapon(Weapon weapon)
        {
            if (weaponComboHitParams.ContainsKey(weapon.type))
            {
                currentWeaponComboHitParams = weaponComboHitParams[weapon.type];

                successAttackInRow    = 0;
                maxSuccessAttackInRow = currentWeaponComboHitParams.maxAttackInRow;
            }
        }
Exemplo n.º 2
0
        public override void Init(Stats actorStats, BaseInput baseInput)
        {
            base.Init(actorStats, baseInput);

            equipmentManager = GameController.instance.playerManager.equipmentManager;


            weaponComboHitParams = new Dictionary <WeaponType, WeaponComboHitParams>();
            foreach (WeaponComboHitParams comboParams in weaponsCombo)
            {
                weaponComboHitParams.Add(comboParams.weaponType, comboParams);
            }

            currentWeaponComboHitParams            = GetDefaultComboParams();
            equipmentManager.onMeleeWeaponEquip   += SetComboHitByWeapon;
            equipmentManager.onMeleeWeaponUnequip += SetDefaultWeaponCombo;
        }
Exemplo n.º 3
0
        private WeaponComboHitParams GetDefaultComboParams()
        {
            WeaponComboHitParams param = new WeaponComboHitParams();

            param.maxAttackInRow = 1;
            param.delay          = new float[1] {
                meleeAttackDelay
            };
            param.speed = new float[1] {
                meleeAttackSpeed
            };
            param.raduis = new float[1] {
                meleeAttackRaduis
            };
            param.finalDamageMultiplier = new float[1] {
                1f
            };

            return(param);
        }
Exemplo n.º 4
0
 void SetDefaultWeaponCombo(Weapon weapon)
 {
     currentWeaponComboHitParams = GetDefaultComboParams();
 }