Пример #1
0
    public void ChangePhysicalDamage(float multiplier, float duration)
    {
        if (playerManager == null)
        {
            return;
        }

        var playerPhysDmg = playerManager.GetAttributeValue(Attributes.PhysicalDamage);

        physDmgMod.buffMod = (int)(playerPhysDmg * multiplier);
        playerManager.AddAtributeModifier(Attributes.PhysicalDamage, physDmgMod);
    }
Пример #2
0
    private void Parry()
    {
        if ((Time.time - lastParry) > parryCd)
        {
            lastParry = Time.time;
            animator.SetTrigger(parryTrigger);
            photonView.RPC("ParryAnimation", RpcTarget.Others);

            int armorVal = playerManager.GetAttributeValue(Attributes.Armor);
            if (armorVal == 0)
            {
                parryModifier.parryMod = 1;
            }
            else
            {
                parryModifier.parryMod = (int)(armorVal * 0.5f);
            }
            playerManager.AddAtributeModifier(Attributes.Armor, parryModifier);
        }
    }