1+ <?php
2+ $ title = "Multi Touch " ;
3+ require ('../head.php ' );
4+ ?>
5+
6+ <script type="text/javascript">
7+
8+ (function () {
9+
10+ function loadStarted(size) {
11+ console.log('Loader started, queue size:', size);
12+ }
13+
14+ // this.progress, previousKey, success, this.queueSize - this._keys.length, this.queueSize
15+ function fileLoaded(progress, key, success, remaining, total) {
16+ console.log('File Loaded:', key);
17+ console.log('Progress: ' + progress + '%');
18+ console.log('File: ' + remaining + ' out of ' + total);
19+ }
20+
21+ function loadCompleted() {
22+
23+ console.log('Loader finished');
24+
25+ // Let's try adding an image to the DOM
26+ document.body.appendChild(game.cache.getImage('cockpit'));
27+
28+ // And some text
29+ var para = document.createElement('pre');
30+ para.innerHTML = game.cache.getText('copyright');
31+ document.body.appendChild(para);
32+
33+ }
34+
35+ var game = new Phaser.Game(320, 240, Phaser.AUTO, '', {preload:preload});
36+
37+ function preload () {
38+
39+ game.load.image('cockpit', 'assets/pics/cockpit.png');
40+ game.load.image('rememberMe', 'assets/pics/remember-me.jpg');
41+ game.load.image('overdose', 'assets/pics/lance-overdose-loader_eye.png');
42+ game.load.text('copyright', 'assets/warning - copyright.txt');
43+
44+ game.load.onLoadStart.add(loadStarted, this);
45+ game.load.onFileComplete.add(fileLoaded, this);
46+ game.load.onLoadComplete.add(loadCompleted, this);
47+
48+ }
49+
50+
51+
52+ })();
53+
54+ </script>
55+
56+
57+
58+ <?php
59+ require ('../foot.php ' );
60+ ?>
0 commit comments