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/PluginManager.js
+58-68Lines changed: 58 additions & 68 deletions
Original file line number
Diff line number
Diff line change
@@ -13,43 +13,42 @@
13
13
* @classdesc Phaser - PluginManager
14
14
* @constructor
15
15
* @param {Phaser.Game} game - A reference to the currently running game.
16
-
* @param {Description} parent - Description.
17
16
*/
18
-
Phaser.PluginManager=function(game,parent){
17
+
Phaser.PluginManager=function(game){
19
18
20
19
/**
21
20
* @property {Phaser.Game} game - A reference to the currently running game.
22
21
*/
23
22
this.game=game;
24
23
25
24
/**
26
-
* @property {Description} _parent - Description.
27
-
* @private
25
+
* @property {array} plugins - An array of all the plugins being managed by this PluginManager.
28
26
*/
29
-
this._parent=parent;
27
+
this.plugins=[];
30
28
31
29
/**
32
-
* @property {array} plugins - Description.
30
+
* @property {number} _len - Internal cache var.
31
+
* @private
33
32
*/
34
-
this.plugins=[];
33
+
this._len=0;
35
34
36
35
/**
37
-
* @property {array} _pluginsLength - Description.
36
+
* @property {number} _i - Internal cache var.
38
37
* @private
39
-
* @default
40
38
*/
41
-
this._pluginsLength=0;
39
+
this._i=0;
42
40
43
41
};
44
42
45
43
Phaser.PluginManager.prototype={
46
44
47
45
/**
48
-
* Add a new Plugin to the PluginManager.
49
-
* The plugin's game and parent reference are set to this game and pluginmanager parent.
46
+
* Add a new Plugin into the PluginManager.
47
+
* The Plugin must have 2 properties: game and parent. Plugin.game is set to ths game reference the PluginManager uses, and parent is set to the PluginManager.
48
+
*
50
49
* @method Phaser.PluginManager#add
51
-
* @param {Phaser.Plugin} plugin - Description.
52
-
* @return {Phaser.Plugin} Description.
50
+
* @param {object|Phaser.Plugin} plugin - The Plugin to add into the PluginManager. This can be a function or an existing object.
51
+
* @return {Phaser.Plugin} The Plugin that was added to the manager.
Copy file name to clipboardExpand all lines: src/particles/arcade/Emitter.js
+24-16Lines changed: 24 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -40,18 +40,6 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
40
40
*/
41
41
this.type=Phaser.EMITTER;
42
42
43
-
/**
44
-
* @property {number} x - The X position of the top left corner of the emitter in world space.
45
-
* @default
46
-
*/
47
-
// this.x = 0;
48
-
49
-
/**
50
-
* @property {number} y - The Y position of the top left corner of emitter in world space.
51
-
* @default
52
-
*/
53
-
// this.y = 0;
54
-
55
43
/**
56
44
* @property {number} width - The width of the emitter. Particles can be randomly generated from anywhere within this box.
57
45
* @default
@@ -165,10 +153,10 @@ Phaser.Particles.Arcade.Emitter = function (game, x, y, maxParticles) {
165
153
this.particleAnchor=newPhaser.Point(0.5,0.5);
166
154
167
155
/**
168
-
* @property {boolean} exists - Determines whether the emitter is being updated by the core game loop.
156
+
* @property {number} blendMode - The blendMode as set on the particle when emitted from the Emitter. Defaults to NORMAL. Needs browser capable of supporting canvas blend-modes (most not available in WebGL)
169
157
* @default
170
158
*/
171
-
// this.exists = true;
159
+
this.blendMode=Phaser.blendModes.NORMAL;
172
160
173
161
/**
174
162
* The point the particles are emitted from.
@@ -479,6 +467,8 @@ Phaser.Particles.Arcade.Emitter.prototype.emitParticle = function () {
0 commit comments