Skip to content

GameObj.toRect

Douglas Lacerda edited this page Aug 5, 2018 · 1 revision

Rect GameObj.toRect()

Return

Rect: GameObj rect.

Description

Get a rect with the GameObj position and size.

You can test this snippet of code here.

let gameObj = new GameObj(30, 50, 3, 2);
console.log(gameObj.toRect());
Clone this wiki locally