public void ApplyDmg(float dmg) { health -= dmg; if (!(isDead)) { GameManagement.AddPoints(ptValue); if (health <= 0) { Death(); } } }
public void TakeDamage(int amount) { currentHealth -= amount; if (currentHealth <= 0) { currentHealth = 0; GameManagement.AddPoints(points); spawnPoint = spawner.GetComponent <SpawnManager>().Spawn(); transform.position = spawnPoint; currentHealth = maxHealth; // Destroy(gameObject); } }