var theCount : int = 0;
for ( var thisToken : GameObject in Tokens ) {
if ( thisToken.transform.position.x > 0 ) {
theCount ++;
}
}
Debug.Log("GameObjects with positive x: " + theCount);
/* another way to write it that does the same thing: */
var theCount : int = 0;
for ( var i = 0; i < Tokens.length; i ++ ) {
var thisToke : GameObject = Tokens*;*
*if ( thisToke.position.x > 0 ) {*
*theCount ++;*
*}*
*}*
*Debug.Log("GameObjects with positive x: " + theCount);*
*```*