diff --git a/src/assets/PixelText.ttf b/src/assets/PixelText.ttf new file mode 100644 index 0000000..bcb7cc4 Binary files /dev/null and b/src/assets/PixelText.ttf differ diff --git a/src/assets/styles.css b/src/assets/styles.css index 8f8ba22..30fb891 100644 --- a/src/assets/styles.css +++ b/src/assets/styles.css @@ -1,3 +1,8 @@ +@font-face { + font-family: pixel; + src: url(PixelText.ttf) +} + body { background-color: black; margin-top: 50px; @@ -46,4 +51,6 @@ canvas { display: block; position: absolute; text-align: left; + font-family: pixel; + font-size: 3em; } diff --git a/src/bubble.js b/src/bubble.js index 40a49ad..f2c1926 100644 --- a/src/bubble.js +++ b/src/bubble.js @@ -11,7 +11,7 @@ dom.innerHTML = ''; dom.style.left = position[0]*8; - dom.style.top = position[1]*8; + dom.style.top = position[1]*8-18; var parts = text.split(' '); var showFragment = function() { @@ -40,7 +40,7 @@ } bubble.skip('talk'); var text = texts.shift(); - return show(text, position || [5, 44]) + return show(text, position || [5, 52]) .then(function(what) { if (what === 'talk') { return Promise.resolve(what); diff --git a/src/stasis.js b/src/stasis.js index f06f23c..66aa493 100644 --- a/src/stasis.js +++ b/src/stasis.js @@ -8,7 +8,8 @@ var doorSprite = null; var roomState = { isDoorOpen: false, - isLightOn: false + isLightOn: false, + isIntroRunning: true }; stasis.init = function() { @@ -35,6 +36,7 @@ kontra.sprite({x: 15, y: 12, width: 3, height: 2, image: kontra.assets.images.stasis_lightSwitch})) .addCallback(function() { + if (roomState.isIntroRunning) return; if (!roomState.isLightOn) { roomState.isLightOn = true; muri.get('bubble') @@ -52,9 +54,12 @@ muri.get('bubble') .story([ [['Beep', 'Bip, Bip'], [20, 15]], - [['Urgh ... ...', 'Where I am?', 'What happened?'], [35, 40]], - [['I can\'t see a thing ...', '... need to turn on the light ...'], [35, 40]] - ]); + [['Urgh ... ...', 'Where I am?', 'What happened?'], [40, 35]], + [['I can\'t see a thing ...', '... need to turn on the light ...'], [40, 35]] + ]) + .then(function() { + roomState.isIntroRunning = false; + }); } };