refactor: out of closure
This commit is contained in:
parent
ea60d893ca
commit
1d3f614d9b
|
@ -161,11 +161,11 @@ export class Emitter extends decorate(Trait) {
|
||||||
},
|
},
|
||||||
|
|
||||||
emitParticleJson: (json) => {
|
emitParticleJson: (json) => {
|
||||||
return K.stream((emitter) => {
|
let {
|
||||||
let {
|
count = 1,
|
||||||
count = 1,
|
rate = 0,
|
||||||
rate = 0,
|
} = json;
|
||||||
} = json;
|
const stream = K.stream((emitter) => {
|
||||||
if (0 === rate) {
|
if (0 === rate) {
|
||||||
for (let i = 0; i < count; ++i) {
|
for (let i = 0; i < count; ++i) {
|
||||||
this.emitParticleJson(json, emitter);
|
this.emitParticleJson(json, emitter);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user