Hi I've got a problem and i need help this has bean stuck on this for days and have not found
a way to fix it so if u can help it will be greatly appreciated
EnemyBehaviour.cs(19,25): error CS1501: No overload for method `TakeDamage' takes `0' arguments
using UnityEngine;
using System.Collections;
public class EnemyBehaviour : MonoBehaviour
{
public int startingHealth = 10;
public int EnemyHealth;
lazerDamage lazer;
void Start ()
{
EnemyHealth = startingHealth;
}
void OnTriggerEnter (Collider other)
{
if(other.gameObject == lazer)
{
TakeDamage();// the error is hear
}
}
void TakeDamage(int AttackDamage)
{
EnemyHealth -= AttackDamage;
if(EnemyHealth <=0)
{
Death();
}
}
void Death()
{
Destroy (gameObject);
}
}
↧