-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapplication.js
More file actions
30 lines (27 loc) · 851 Bytes
/
Copy pathapplication.js
File metadata and controls
30 lines (27 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require.config({
paths: {
'jquery': 'lib/jquery',
'mustache': 'lib/mustache',
'underscore': 'lib/underscore',
'machina': 'lib/machina',
'text': 'lib/text',
'json': 'lib/json',
'EasyStar': 'lib/easystar-0.1.0.min',
'SimplexNoise': 'lib/perlin-noise-simplex',
'THREE': 'lib/three.max',
'Stats': 'lib/stats.min',
'async': 'lib/async',
'mediator': 'lib/mediator'
}
});
require(['core/game', 'scenes/battle'], function(Game, BattleScene) {
var game = window.game = new Game();
game.scene = new BattleScene(game);
game.load();
document.getElementById('start').addEventListener('click', function() {
game.run();
});
document.getElementById('stop').addEventListener('click', function() {
game.stop();
});
});