MCPcopy Create free account
hub / github.com/phaserjs/phaser / setRandomPosition

Method setRandomPosition

types/phaser.d.ts:20476–20476  ·  view source on GitHub ↗

* Sets the position of this Game Object to be a random position within the confines of * the given area. * * If no area is specified a random position between 0 x 0 and the game width x height is used instead. * *

(x?: number, y?: number, width?: number, height?: number)

Source from the content-addressed store, hash-verified

20474 * @returns This Game Object instance.
20475 */
20476 setRandomPosition(x?: number, y?: number, width?: number, height?: number): this;
20477 /**
20478 * Sets the rotation of this Game Object.
20479 * @param radians The rotation of this Game Object, in radians. Default 0.

Callers 1

Transform.test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected