diff --git a/src/lifecycles/gameInit.ts b/src/lifecycles/gameInit.ts index d16d947..ea9e5a5 100644 --- a/src/lifecycles/gameInit.ts +++ b/src/lifecycles/gameInit.ts @@ -1,9 +1,8 @@ import * as LittleJS from 'littlejsengine'; +import { hsl, tile, vec2 } from 'littlejsengine'; import { setParticleEmitter } from '../shared'; -const { tile, vec2, hsl } = LittleJS; - export function gameInit() { // create tile collision and visible tile layer const tileCollisionSize = vec2(32, 16); diff --git a/src/lifecycles/gameRender.ts b/src/lifecycles/gameRender.ts index e7e3a12..07d5320 100644 --- a/src/lifecycles/gameRender.ts +++ b/src/lifecycles/gameRender.ts @@ -1,6 +1,5 @@ import * as LittleJS from 'littlejsengine'; - -const { tile, vec2, hsl } = LittleJS; +import { hsl, tile, vec2 } from 'littlejsengine'; export function gameRender() { // draw a grey square in the background without using webgl diff --git a/src/lifecycles/gameRenderPost.ts b/src/lifecycles/gameRenderPost.ts index 7d08b4f..0e61d21 100644 --- a/src/lifecycles/gameRenderPost.ts +++ b/src/lifecycles/gameRenderPost.ts @@ -1,6 +1,5 @@ import * as LittleJS from 'littlejsengine'; - -const { vec2 } = LittleJS; +import { vec2 } from 'littlejsengine'; export function gameRenderPost() { // draw to overlay canvas for hud rendering diff --git a/src/lifecycles/gameUpdate.ts b/src/lifecycles/gameUpdate.ts index 9c18359..0a9deab 100644 --- a/src/lifecycles/gameUpdate.ts +++ b/src/lifecycles/gameUpdate.ts @@ -1,9 +1,8 @@ import * as LittleJS from 'littlejsengine'; +import { hsl } from 'littlejsengine'; import { getParticleEmitter } from '../shared'; -const { hsl } = LittleJS; - // sound effects const sound_click = new LittleJS.Sound([1, 0.5]);