Creates a new Game Object and adds it to this group, unless the group is.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number | <optional> | 0 |
The horizontal position of the new Game Object in the world. |
y | number | <optional> | 0 |
The vertical position of the new Game Object in the world. |
key | string | <optional> | defaultKey |
The texture key of the new Game Object. |
frame | string | number | <optional> | defaultFrame |
The texture frame of the new Game Object. |
visible | boolean | <optional> | true |
The {@link Phaser.GameObjects.Components.Visible#visible} state of the new Game Object. |
active | boolean | <optional> | true |
The {@link Phaser.GameObjects.GameObject#active} state of the new Game Object. |
The new Game Object (usually a Sprite, etc.).