Browse Source

Added missing function for effects

tags/v0.10.6^2
Shaun 2 years ago
parent
commit
9c1984c79f
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      src/server/components/effects.js

+ 12
- 0
src/server/components/effects.js View File

@@ -240,6 +240,18 @@ module.exports = {
this.effects.spliceWhere(e => e.id === id);
},

removeEffectByType: function (type) {
let effects = this.effects.filter(e => e.type === type);

effects.forEach(e => {
this.destroyEffect(e);

this.syncRemove(e.id);
this.effects.spliceWhere(f => f === e);
});
},

getEffectByType: function (effectType) {
const effect = this.effects.find(e => e.type === effectType);



Loading…
Cancel
Save