Scans the group for the first member that has an Phaser.GameObjects.GameObject#active state set to false
,
assigns x
and y
, and returns the member.
If no inactive member is found and the group isn't full then it will create a new Game Object using x
, y
, key
, frame
, and visible
.
The new Game Object will have its active state set to true
.
Unless a new member is created, key
, frame
, and visible
are ignored.
name | type | arguments | Default | description |
---|---|---|---|---|
x | number | <optional> |
The horizontal position of the Game Object in the world. |
|
y | number | <optional> |
The vertical position of the Game Object in the world. |
|
key | string | <optional> | defaultKey |
The texture key assigned to a new Game Object (if one is created). |
frame | string | number | <optional> | defaultFrame |
A texture frame assigned to a new Game Object (if one is created). |
visible | boolean | <optional> | true |
The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created). |
The first inactive group member, or a newly created member, or null.