I upgraded to Unity 3 and this statement no longer works:
public function engaged(type:int):boolean {
return (current type > 0) ? true : false;
}
The function always returns false even if current type evaluates to greater than 0:
private function engage(type:int) {
Debug.Log(type+" :: "+(current type)+" :: "+engaged(type));
current |= type;
Debug.Log(type+" :: "+(current type)+" :: "+engaged(type));
}
The above outputs:
4 :: 0 :: False
4 :: 4 :: False