예제 #1
0
    private void OnSuccesAttack(Attack_Result result, Damagetype dmg_type, EntityBase ent) // recibe el resultado del ataque y suma uno al contador. Si llega al ncesario, activa el skill
    {
        if (isActive)
        {
            return;
        }

        if (result == Attack_Result.sucessful)
        {
            cantDeGolpesExitosos++;
        }

        if (cantDeGolpesExitosos == hitsToActivate)
        {
            cantDeGolpesExitosos = 0;
            isActive             = true;
            //_characterAttack.currentWeapon.ModifyAttackrange(CalculateRangeAttackModifier(percentRangeModifier));
            _characterAttack.currentWeapon.BeginOverrideRange(NO_OVERRIDE_VALUE, RangeMultiplier);
            _characterAttack.currentWeapon.BeginOverrideAngle(NO_OVERRIDE_VALUE, AngleMultiplier);
            aura.position = charHead.transform.position + Vector3.up * .25f;
            aura.gameObject.SetActive(true);

            charHead.GetCharacterAttack().OnAttack += SetGhostSword;
        }
    }
예제 #2
0
    void CALLBACK_DealDamage(Attack_Result attack_result, Damagetype damage_type, EntityBase entityToDamage)
    {
        callback_ReceiveEntity();
        FirstAttackReady(false);//esto tambien es de obligacion... tampoco debería estar aca

        if (entityToDamage.GetComponent <DestructibleBase>())
        {
            BreakObject.Invoke();
            return;
        }

        switch (attack_result)
        {
        case Attack_Result.sucessful:

            if (damage_type == Damagetype.heavy)
            {
                DealSuccesfullHeavy();
            }
            else
            {
                DealSuccesfullNormal();
            }

            break;

        case Attack_Result.blocked:
            break;

        case Attack_Result.parried:
            break;

        case Attack_Result.reflexed:
            break;

        case Attack_Result.inmune:
            break;

        case Attack_Result.death:

            if (damage_type == Damagetype.heavy)
            {
                KillSuccesfullHeavy();
            }
            else
            {
                KillSuccesfullNormal();
            }

            break;
        }
    }
예제 #3
0
    public void HeadAttack(EntityBase e)
    {
        Attack_Result takeDmg = e.TakeDamage(normalDamage, transform.position, Damagetype.parriable);

        if (takeDmg == Attack_Result.parried)
        {
            sm.SendInput(JabaliInputs.PARRIED);

            //Tira evento si es parrieado. Seguro haya que cambiarlo
            if (OnParried != null)
            {
                OnParried();
            }
        }
    }
예제 #4
0
    public void AttackEntity(EntityBase e)
    {
        Attack_Result takeDmg = e.TakeDamage(damage, transform.position, Damagetype.parriable);

        if (takeDmg == Attack_Result.parried)
        {
            combatComponent.Stop();
            sm.SendInput(DummyEnemyInputs.PARRIED);

            //Tira evento si es parrieado. Seguro haya que cambiarlo
            if (OnParried != null)
            {
                OnParried();
            }
        }
    }
예제 #5
0
 void PushRelease(EntityBase e)
 {
     Attack_Result takeDmg = e.TakeDamage(normalDamage, transform.position, Damagetype.inparry);
 }