Commit 0ae467ac by oriol

fix imports

parent d5b11369
......@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm run webpack",
"start": "npm run webpack",
"webpack": "webpack -d --watch --display-error-details"
},
"repository": {
......
......@@ -3,4 +3,7 @@ entry: './www/js/main.js',
output: {
filename: './www/js/compiled.js'
},
resolve: {
modules:["./www/js"]
}
};
\ No newline at end of file
......@@ -154,4 +154,5 @@ case 3:pan.set(1); break;
game.score-=game.level*10;
}//hit not
}
}
\ No newline at end of file
}
exports {Game}
\ No newline at end of file
'use strict';
class KeyboardInput {
import {InputHandler} from 'inputHandler'
export default class KeyboardInput {
constructor() {
this.keyDown = [];
this.justPressed = [];
......@@ -56,4 +57,4 @@ class KeyboardInput {
}
return false;
}
}
\ No newline at end of file
}
class InputHandler {
export default class InputHandler {
constructor(world, doGyro=false) {
this.world = world;
this.input = new KeyboardInput();
......
......@@ -69,4 +69,5 @@ this.slapSound.play();
this.alive=false;
game.enemies.splice(this.position,1)
}//die
}
\ No newline at end of file
}
export {Insect}
\ No newline at end of file
"use strict";
import {*} from ./www/js/sono/core;
import {Strings} from 'strings.js'
var strings=new Strings();
var tick=null;
var sKill;
......@@ -9,12 +9,13 @@ var timeToLoad=0;
var sndProgress=null;
var isMobile=false
$(document).ready(playIntro);
import {KeyboardInput} from 'input.js';
var inp=new KeyboardInput;
var game=new Game;
game.mode="insects"
var progress=0;
var id = document.getElementById("touchArea");
var hammer = new Hammer(id);
import {KeyboardInput} from 'input'
var sound = null;
function playIntro() {
sound = soundObject.create("logo1");
......
......@@ -6,4 +6,5 @@ stats:"stats",
}
}
}
\ No newline at end of file
}
exports {Strings}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment