mirror of
https://github.com/motajs/template.git
synced 2026-10-17 03:10:17 +08:00
test(08-09): drop removed hook controller .load() in shared fixture
addHook now auto-loads; the returned controller exposes only unload().
This commit is contained in:
parent
ff9fd77880
commit
551e63de9a
@ -150,14 +150,13 @@ export function createClosedLoopFixture(): IClosedLoopFixture {
|
||||
}
|
||||
const eventLayer = map.eventLayer;
|
||||
const eventCompletion = Promise.withResolvers<void>();
|
||||
const eventHook = eventLayer.addHook({
|
||||
eventLayer.addHook({
|
||||
onUpdateBlock: (block, x, y) => {
|
||||
if (block === 2 && x === 1 && y === 0) {
|
||||
eventCompletion.resolve();
|
||||
}
|
||||
}
|
||||
});
|
||||
eventHook.load();
|
||||
const event = new GameEvent(
|
||||
state.eventSystem.executor.interpreter,
|
||||
rawEvent
|
||||
|
||||
Loading…
Reference in New Issue
Block a user