fix: destruction dependency
This commit is contained in:
parent
11457a3c75
commit
ceaa7c1287
|
@ -9,7 +9,9 @@ export default class Harmful extends Component {
|
|||
const script = this.harmScript.clone();
|
||||
script.locals.other = other;
|
||||
script.locals.entity = entity;
|
||||
entity.Ticking.add(script.ticker());
|
||||
const promise = entity.Ticking.add(script.ticker());
|
||||
ecs.addDestructionDependency(entity.id, promise);
|
||||
ecs.addDestructionDependency(other.id, promise);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user