mirror of
https://github.com/photonstorm/phaser
synced 2024-12-21 10:33:35 +00:00
1 line
70 KiB
JSON
1 line
70 KiB
JSON
|
{"class":{"name":"Phaser.Group","extends":"PIXI.DisplayObjectContainer","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null},{"name":"parent","type":["Phaser.Group","Phaser.Sprite","null"],"help":"The parent Group, DisplayObject or DisplayObjectContainer that this Group will be added to. If `undefined` it will use game.world. If null it won't be added to anything.","optional":false,"default":null},{"name":"name","type":["string"],"help":"A name for this Group. Not used internally but useful for debugging.","optional":true,"default":"group"},{"name":"addToStage","type":["boolean"],"help":"If set to true this Group will be added directly to the Game.Stage instead of Game.World.","optional":true,"default":"false"},{"name":"enableBody","type":["boolean"],"help":"If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType.","optional":true,"default":"false"},{"name":"physicsBodyType","type":["number"],"help":"If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc.","optional":true,"default":"0"}],"help":"A Group is a container for display objects that allows for fast pooling and object recycling.\\nGroups can be nested within other Groups and have their own local transforms."},"consts":[{"name":"RETURN_CHILD","type":"number","help":"","line":183},{"name":"RETURN_NONE","type":"number","help":"","line":171},{"name":"RETURN_TOTAL","type":"number","help":"","line":177},{"name":"SORT_ASCENDING","type":"number","help":"","line":189},{"name":"SORT_DESCENDING","type":"number","help":"","line":195}],"methods":{"public":[{"name":"add","static":false,"returns":{"types":["any"],"help":"The child that was added to the Group."},"help":"Adds an existing object to this Group. The object can be an instance of Phaser.Sprite, Phaser.Button or any other display object.\\nThe child is automatically added to the top of the Group, so renders on-top of everything else within the Group. If you need to control\\nthat then see the addAt method.","line":209,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","type":["any"],"help":"An instance of Phaser.Sprite, Phaser.Button or any other display object.","optional":false,"default":null},{"name":"silent","type":["boolean"],"help":"If the silent parameter is `true` the child will not dispatch the onAddedToGroup event.","optional":true,"default":"false"}],"inherited":true,"inheritedFrom":"Phaser.Group"},{"name":"addAll","static":false,"returns":null,"help":"Adds the amount to the given property on all children in this Group.\\nGroup.addAll('x', 10) will add 10 to the child.x value.","line":956,"public":true,"protected":false,"private":false,"parameters":[{"name":"property","type":["string"],"help":"The property to increment, for example 'body.velocity.x' or 'angle'.","optional":false,"default":null},{"name":"amount","type":["number"],"help":"The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.","optional":false,"default":null},{"name":"checkAlive","type":["boolean"],"help":"If true the property will only be changed if the child is alive.","optional":false,"default":null},{"name":"checkVisible","type":["boolean"],"help":"If true the property will only be changed if the child is visible.","optional":false,"default":null}],"inherited":true,"inheritedFrom":"Phaser.Group"},{"name":"addAt","static":false,"returns":{"types":["any"],"help":"The child that was added to the Group."},"help":"Adds an existing object to this Group. The object can be an instance of Phaser.Sprite, Phaser.Button or any other display object.\\nThe child is added to the Group at the location specified by the index value, this allows you to control child ordering.","line":273,"public":true,"protected":false,"private":false,"parameters":[{"name":"child","typ
|