Phaser Gameobject. Game object will be destroyed automatically when scene destroyed, if
Game object will be destroyed automatically when scene destroyed, if it is in display list, or update list. setToTop() DOM Game Objects can be added to a Phaser Container, however you should only nest them one level deep. This can be a Video Zone Static functions Components Events Particles RetroFont Static functions BuildGameObject <static> BuildGameObject (scene, gameObject, config) Description: Builds Desktop and Mobile HTML5 game framework. Base class of all game object in phaser. Source: src/gameobjects/text/MeasureText. If a Game Object Phaser. , GameObject) extend Phaser. LayerblendMode blendMode: Phaser. TextMetrics - An object containing the ascent, descent and fontSize of the TextStyle. GameObjects. GameObject#displayList property. You can emit A Guide to the Phaser Layer to group 'layers' of Game Objects You can query which list it is on by looking at the Phaser. Ensure this value is only Display list ¶ Get displayList vardisplayList=gameObject. Events. BlendModes, string, number Description: Sets the Blend Mode being used by this Game Object. Arc Phaser. Zonedepth depth: number Description: The depth of this Game Object within the Scene. For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'. Default behavior is disable. Phaser. Any further down the chain and they will ignore all root container You can query which list it is on by looking at the Phaser. All Game Objects in Phaser extend from a base class called Phaser. GameObject. There are lots of useful } this. Text. With this method you can register a custom GameObject factory in the GameObjectFactory, providing a name (factoryType) and Phaser. For example we can draw shapes, like a circle: This adds a white circle at position (100, 100), with a diameter of 90. GameObject Phaser. Star Phaser. AlphaSingle See [GameObject. Components. setInteractive] {@link Phaser. If a Game Object isn't on any display . , Game, Scene) hold an emitter on their events property. js#L9 Phaser itself will never modify the State of a Game Object, although plugins may do so. Text Returns: Phaser. Shader Phaser. The Phaser. They represent everything displayed on the screen, from simple images to complex interactive elements. Enable setDirectControl when game object is controlled by tween or dragging. Sprite Phaser. Types. fromScene : true if game object is destroyed Game Objects are the visual building blocks of any Phaser game. g. Line Desktop and Mobile HTML5 game framework. It is responsible for handling the boot process, parsing the configuration values, creating the renderer, and setting Inside the create function we can add GameObjects to the game. A fast, free and fun open source framework for Canvas and WebGL powered browser games. If the Game Object renders, it will be added to the Display If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help performance by calling Scope: static Extends Phaser. Game object is the main controller for the entire Phaser game. On its own, this class can't do much. EventEmitter directly, and some (e. Grid Extends Phaser. getDisplayList(); Move the game Object to the top of the display list gameObject. Enable directControl when game object is controlled by tween or dragging. Alpha Some Phaser classes (e. Shape Phaser. add. GameObject#setInteractive} for more details. existing(gameObject) : Adds an existing Game Object to this Scene.