I am making a Script that counts down time
My code is:
var DecayTime : int = 1;
var CurrentTime : int = 300;
var MaxTime : int = 300;
function Awake () {
CurrentTime = MaxTime;
}
function Update() {
guiText.text = "" + CurrentTime;
}
function FixedUpdate() {
CurrentTime -= DecayTime == CurrentTime;
}
The compiler is giving me :
Assets/Scripts/count_Death.js(16,13): BCE0051: Operator ‘-’ cannot be used with a left hand side of type ‘int’ and a right hand side of type ‘boolean’.
I am new with unityscript but please be straight with me