MCPcopy Create free account
hub / github.com/melonjs/melonJS / onDeactivateEvent

Method onDeactivateEvent

packages/melonjs/src/renderable/imagelayer.js:342–348  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

340
341 // called when the layer is removed from the game world or a container
342 onDeactivateEvent() {
343 // cancel all event subscriptions
344 off(VIEWPORT_ONCHANGE, this.updateLayer, this);
345 off(VIEWPORT_ONRESIZE, this.resize, this);
346 off(LEVEL_LOADED, this.updateLayer, this);
347 off(ONCONTEXT_RESTORED, this.createPattern, this);
348 }
349
350 /**
351 * Destroy function

Callers

nothing calls this directly

Calls 1

offFunction · 0.90

Tested by

no test coverage detected