You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/gameobjects/group/Group.js
+76-11Lines changed: 76 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -686,7 +686,7 @@ var Group = new Class({
686
686
},
687
687
688
688
/**
689
-
* Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
689
+
* Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
690
690
* assigns `x` and `y`, and returns the member.
691
691
*
692
692
* If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
* Scans the group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
714
+
* Scans the Group, from top to bottom, for the nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
715
+
* assigns `x` and `y`, and returns the member.
716
+
*
717
+
* If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
718
+
* Unless a new member is created, `key`, `frame`, and `visible` are ignored.
719
+
*
720
+
* @method Phaser.GameObjects.Group#getFirstNth
721
+
* @since 3.5.2
722
+
*
723
+
* @param {integer} nth - The nth matching Group member to search for.
724
+
* @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.
725
+
* @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.
726
+
* @param {number} [x] - The horizontal position of the Game Object in the world.
727
+
* @param {number} [y] - The vertical position of the Game Object in the world.
728
+
* @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).
729
+
* @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).
730
+
* @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).
731
+
*
732
+
* @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null.
* Scans the Group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
715
741
* assigns `x` and `y`, and returns the member.
716
742
*
717
743
* If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
718
744
* Unless a new member is created, `key`, `frame`, and `visible` are ignored.
719
745
*
720
746
* @method Phaser.GameObjects.Group#getLast
721
-
* @since 3.6.0
747
+
* @since 3.5.2
722
748
*
723
749
* @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.
724
750
* @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.
* Scans the Group for the last nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,
766
+
* assigns `x` and `y`, and returns the member.
767
+
*
768
+
* If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.
769
+
* Unless a new member is created, `key`, `frame`, and `visible` are ignored.
770
+
*
771
+
* @method Phaser.GameObjects.Group#getLastNth
772
+
* @since 3.5.2
773
+
*
774
+
* @param {integer} nth - The nth matching Group member to search for.
775
+
* @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.
776
+
* @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.
777
+
* @param {number} [x] - The horizontal position of the Game Object in the world.
778
+
* @param {number} [y] - The vertical position of the Game Object in the world.
779
+
* @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).
780
+
* @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).
781
+
* @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).
782
+
*
783
+
* @return {?Phaser.GameObjects.GameObject} The first matching group member, or a newly created member, or null.
0 commit comments