Пример #1
0
 private void OnReachPlayer()
 {
     playerStats.TakeDamage(attackDamage);
     Instantiate(deathEffect, transform.position, Quaternion.identity);
     PlayerNode.HitColorEffect();
     Die();
     if (isSabator)
     {
         playerStats.specialBullets -= specialBulletDeduction;
     }
 }
Пример #2
0
    private void OnWrongHit(Enemy hitEnemy)
    {
        if (hitEnemy.isSabator)
        {
            playerStats.specialBullets -= hitEnemy.specialBulletDeduction;
        }

        if (hitEnemy.poisonEffect != null)
        {
            GameObject i = Instantiate(hitEnemy.poisonEffect, transform.position, Quaternion.identity) as GameObject;
            Destroy(i.gameObject, 3f);
        }
        playerStats.TakeDamage(hitEnemy.errorShotDamage);
        PlayerNode.HitColorEffect();
    }