private void OnReachPlayer() { playerStats.TakeDamage(attackDamage); Instantiate(deathEffect, transform.position, Quaternion.identity); PlayerNode.HitColorEffect(); Die(); if (isSabator) { playerStats.specialBullets -= specialBulletDeduction; } }
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(); }