-
Notifications
You must be signed in to change notification settings - Fork 0
Ramu.Utils.isOutOfCanvas
Douglas Lacerda edited this page Aug 4, 2018
·
5 revisions
static bool
Ramu.Utils.isOutOfCanvas(gameObject)
-
gameObject
gameObject: gameObject to be checked.
bool
: Return true if the gameObj is outside of the canvas and false if not.
Check if the gameObject position (x,y) is out of the canvas.
let gameobj = new GameObj(1, 2, 4, 4);
if (Ramu.Utils.isOutOfCanvas(gameobj)){
console.log('is inside');
} else {
console.log('is not');
}