You've already forked zumbi-game
translate debug log messages
This commit is contained in:
@@ -90,7 +90,7 @@ public class ZombieController : MonoBehaviour
|
|||||||
public void TakeDamage(float amount)
|
public void TakeDamage(float amount)
|
||||||
{
|
{
|
||||||
currentHealth -= amount;
|
currentHealth -= amount;
|
||||||
Debug.Log($"{gameObject.name} dostal {amount} damage. HP: {currentHealth}/{maxHealth}");
|
Debug.Log($"{gameObject.name} took {amount} damage. HP: {currentHealth}/{maxHealth}");
|
||||||
|
|
||||||
if (currentHealth <= 0)
|
if (currentHealth <= 0)
|
||||||
Die();
|
Die();
|
||||||
@@ -98,7 +98,7 @@ public class ZombieController : MonoBehaviour
|
|||||||
|
|
||||||
private void Die()
|
private void Die()
|
||||||
{
|
{
|
||||||
Debug.Log($"{gameObject.name} je mŕtvy!");
|
Debug.Log($"{gameObject.name} is dead");
|
||||||
animator.SetTrigger(DieHash);
|
animator.SetTrigger(DieHash);
|
||||||
Destroy(gameObject, 2f);
|
Destroy(gameObject, 2f);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user