Skip to content

Commit 7492524

Browse files
authored
Merge pull request #7066 from samme/particles-moveTo-better
Fix particle emitter custom moveTo functions
2 parents b2b7246 + 500696d commit 7492524

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gameobjects/particles/ParticleEmitter.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ var GameObject = require('../GameObject');
1717
var GetFastValue = require('../../utils/object/GetFastValue');
1818
var GetRandom = require('../../utils/array/GetRandom');
1919
var GravityWell = require('./GravityWell');
20+
var HasAll = require('../../utils/object/HasAll');
2021
var HasAny = require('../../utils/object/HasAny');
2122
var HasValue = require('../../utils/object/HasValue');
2223
var Inflate = require('../../geom/rectangle/Inflate');
@@ -978,7 +979,7 @@ var ParticleEmitter = new Class({
978979

979980
this.acceleration = (this.accelerationX !== 0 || this.accelerationY !== 0);
980981

981-
this.moveTo = (this.moveToX !== 0 && this.moveToY !== 0);
982+
this.moveTo = HasAll(config, [ 'moveToX', 'moveToY' ]);
982983

983984
// Special 'speed' override
984985

0 commit comments

Comments
 (0)