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/core/Group.js
+70Lines changed: 70 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -746,6 +746,45 @@ Phaser.Group.prototype.setProperty = function (child, key, value, operation, for
746
746
747
747
};
748
748
749
+
/**
750
+
* Checks a property for the given value on the child.
751
+
*
752
+
* @method Phaser.Group#checkProperty
753
+
* @param {*} child - The child to check the property value on.
754
+
* @param {array} key - An array of strings that make up the property that will be set.
755
+
* @param {*} value - The value that will be checked.
756
+
* @param {boolean} [force=false] - If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.
757
+
* @return {boolean} True if the property was was equal to value, false if not.
* This function allows you to quickly check that the same property across all children of this Group is equal to the given value
895
+
* This call doesn't descend down children, so if you have a Group inside of this Group, the property will be checked on the Group but not its children.
896
+
*
897
+
*
898
+
* @method Phaser.Group#checkAll
899
+
* @param {string} key - The property, as a string, to be set. For example: 'body.velocity.x'
900
+
* @param {*} value - The value that will be checked.
901
+
* @param {boolean} [checkAlive=false] - If set then only children with alive=true will be checked. This includes any Groups that are children.
902
+
* @param {boolean} [checkVisible=false] - If set then only children with visible=true will be checked. This includes any Groups that are children.
903
+
* @param {boolean} [force=false] - If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned.
0 commit comments