Hello ive made a cube (wall) and my ultimate goal is to have the player break the wall by clicking it multiple times within a set amount of time. For now though, all Im looking for is help with this script.
using UnityEngine;
using System.Collections;
public class wallscript : MonoBehaviour {
var amountOfClicks:int=0;
function OnMouseDown(){
if(amountOfClicks>5){
Destroy(gameObject);
}
else{
amountOfClicks++;
}
}
}
It continues to give me the error regarding the colon in
ββvar amountOfClicks:int=0;ββ