if(!$Object) Purpose? (solved)
by rennie moffat · in iTorque 2D · 08/20/2011 (8:15 am) · 0 replies
function playerDo(){
if(!$player.doing){
$player.doing = true;
}
}
What is the purpose of the second line? Why ask if player is not doing?
Thanks,
Watson
EDIT.
I just noticed, it is simple a return (could be anyhow, if not true). As in, if this is true, skip, onto the next.
Sorry bout asking. It was just bugging me as I was looking at it.
if(!$player.doing){
$player.doing = true;
}
}
What is the purpose of the second line? Why ask if player is not doing?
Thanks,
Watson
EDIT.
I just noticed, it is simple a return (could be anyhow, if not true). As in, if this is true, skip, onto the next.
Sorry bout asking. It was just bugging me as I was looking at it.
About the author
My thanks to Garage Games and the Garage Games Community combined with owned determination I got one game up, Temple Racer and I am looking to build more interesting, fun games for the mass market of the iOS app store.