Example #1
0
    /// <summary>
    /// OnTriggerEnter is called when the Collider other enters the trigger.
    /// </summary>
    /// <param name="other">The other Collider involved in this collision.</param>
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag(TagsManager.SwordContact))
        {
            currentBossHealth -= DamageRateManager.GetSwordContactDamage();
        }

        if (other.CompareTag(TagsManager.FootContact))
        {
            currentBossHealth -= DamageRateManager.GetFootContactDamage();
        }

        if (other.CompareTag(TagsManager.SphereSpawn))
        {
            currentBossHealth -= DamageRateManager.GetArcContactDamage();
        }
    }
Example #2
0
    /// <summary>
    /// OnTriggerEnter is called when the Collider other enters the trigger.
    /// </summary>
    /// <param name="other">The other Collider involved in this collision.</param>
    void OnTriggerEnter(Collider other)
    {
        if (other.CompareTag(TagsManager.SwordContact))
        {
            currentMinionHealth -= DamageRateManager.GetSwordContactDamage();
            minionAnimator.SetTrigger(EnemyControlsManager.MinionHitParam);
        }

        if (other.CompareTag(TagsManager.FootContact))
        {
            currentMinionHealth -= DamageRateManager.GetFootContactDamage();
            minionAnimator.SetTrigger(EnemyControlsManager.MinionHitParam);
        }

        if (other.CompareTag(TagsManager.SphereSpawn))
        {
            currentMinionHealth -= DamageRateManager.GetArcContactDamage();
            minionAnimator.SetTrigger(EnemyControlsManager.MinionHitParam);
        }
    }