Skip to content

Ramu.Utils.isOutOfCanvas

Douglas Lacerda edited this page Aug 4, 2018 · 5 revisions

static bool Ramu.Utils.isOutOfCanvas(gameObject)

Parameters

  • gameObject gameObject: gameObject to be checked.

Return

bool: Return true if the gameObj is outside of the canvas and false if not.

Description

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');
}
Clone this wiki locally