public void CollidedWith(Collider _collider)
    {
        Parryable parryable = _collider.GetComponent <Parryable>();

        if (parryable)
        {
            parryable.OnParried();
            AudioManager.Instance.PlaySound("parry");
            EffectsManager.SpawnEffect("Parry", _collider.transform.position, Quaternion.Euler(-90.0f, 0.0f, 0.0f), Vector3.one, 2.0f);

            m_parriedSomething     = true;
            m_player.CurrentCombo += 1;

            m_mana.Mana += parryable.m_manaValue * m_player.m_comboMultiplier;
        }

        Hurtbox hurtbox = _collider.GetComponent <Hurtbox>();

        if (hurtbox)
        {
            if (hurtbox.m_damageType != m_hitbox.m_damageType)
            {
                hurtbox.ApplyDamage(m_damage);
            }
        }
    }
Ejemplo n.º 2
0
    private void ProjectileHit(Hurtbox _hurtbox, Projectile _projectile)
    {
        if (_hurtbox.m_damageType == EDamageType.wormholePoint)
        {
            if (m_pointGameObjects[m_pointsIndex].GetInstanceID() == _hurtbox.gameObject.GetInstanceID())
            {
                ++m_pointsIndex;

                if (m_pointsIndex >= m_points.Count)
                {
                    // Attack finished
                    AttackFinished();
                }
                else
                {
                    MoveTowardsCurrentPoint();
                }
            }
        }

        else if (_hurtbox.m_damageType == EDamageType.player)
        {
            _hurtbox.ApplyDamage(_projectile.m_damage);

            AttackFinished();
        }
    }
Ejemplo n.º 3
0
    private void ProjectileHitPlayer(Hurtbox _player, Projectile _projectile)
    {
        Destroy(_projectile.gameObject);

        _player.ApplyDamage(_projectile.m_damage);

        //HealthComponent healthComp = _player.GetComponent<HealthComponent>();
        //healthComp.Health -= _projectile.m_damage;
    }
Ejemplo n.º 4
0
    private void ProjectileHitBoss(Hurtbox _boss, Projectile _projectile)
    {
        Destroy(_projectile.gameObject);
        _boss.ApplyDamage(_projectile.m_damage);
        ScreenshakeManager.SmallShake(_projectile.m_damage);

        if (m_diamondEffect)
        {
            _boss.GetComponentInParent <BasicBoss>().ApplyDiamondEffectDebuff();
        }
    }