It works just fine, but I would like it in c# as im most familiar with that and I have no clue how to translate it
You can destroy enemies by clicking them, and different enemies require a different amount of clicks.
#pragma strict
var amountOfClicks:int=0;
function OnMouseDown(){
if(amountOfClicks>1)
{
Destroy(gameObject);
}
else{
amountOfClicks++;
}
Kurt: Thanks, I’m somewhat new to coding and was a bit confused. But you pointed me in the right direction
And I tried translating it myself earlier but it didnt work (Dont know why), but now it works