using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Enemy : MonoBehaviour
{
public int maxHealth = 100;
int currentHealth;
// Start is called before the first frame update
void Start()
{
currentHealth = maxHealth;
{
public void TakeDamage(int damage)
{
currentHealth -= damage;
// Play hurt animation
if(currentHealth <= 0)
{
Die();
}
}
void Die()
{
Debug.Log("Enemy died!");
// Die animation
// Disable the enemy
}
}
I’m first day in unity and when I click on play on my poject, these two errors show. Please anyone help me