Skip to content

Commit 7aa7187

Browse files
authored
Merge pull request #5870 from samme/docs/class-types
Add GroupClassTypeConstructor and ParticleClassConstructor types
2 parents 42f2304 + ba5e4ff commit 7aa7187

File tree

6 files changed

+20
-4
lines changed

6 files changed

+20
-4
lines changed

src/gameobjects/group/Group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ var Group = new Class({
125125
* The class to create new group members from.
126126
*
127127
* @name Phaser.GameObjects.Group#classType
128-
* @type {Function}
128+
* @type {Phaser.Types.GameObjects.Group.GroupClassTypeConstructor}
129129
* @since 3.0.0
130130
* @default Phaser.GameObjects.Sprite
131131
*/
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* @callback Phaser.Types.GameObjects.Group.GroupClassTypeConstructor
3+
* @since 3.0.0
4+
*
5+
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.
6+
* @param {number} x - The horizontal position of this Game Object in the world.
7+
* @param {number} y - The vertical position of this Game Object in the world.
8+
* @param {(string|Phaser.Textures.Texture)} texture - The key, or instance of the Texture this Game Object will use to render with, as stored in the Texture Manager.
9+
* @param {(string|number)} [frame] - An optional frame from the Texture this Game Object is rendering with.
10+
*/

src/gameobjects/particles/ParticleEmitter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ var ParticleEmitter = new Class({
167167
* The Particle Class which will be emitted by this Emitter.
168168
*
169169
* @name Phaser.GameObjects.Particles.ParticleEmitter#particleClass
170-
* @type {Phaser.GameObjects.Particles.Particle}
170+
* @type {Phaser.Types.GameObjects.Particles.ParticleClassConstructor}
171171
* @default Phaser.GameObjects.Particles.Particle
172172
* @since 3.0.0
173173
*/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @callback Phaser.Types.GameObjects.Particles.ParticleClassConstructor
3+
* @since 3.0.0
4+
*
5+
* @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter to which this Particle belongs.
6+
*/

src/gameobjects/particles/typedefs/ParticleEmitterConfig.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/physics/arcade/PhysicsGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ var PhysicsGroup = new Class({
103103
* This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those.
104104
*
105105
* @name Phaser.Physics.Arcade.Group#classType
106-
* @type {Function}
106+
* @type {Phaser.Types.GameObjects.Group.GroupClassTypeConstructor}
107107
* @default ArcadeSprite
108108
* @since 3.0.0
109109
*/

0 commit comments

Comments
 (0)