-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxFighter.html
executable file
·72 lines (58 loc) · 1.67 KB
/
xFighter.html
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>X-Fighter</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
</br>
<div id="scores">
<p> Vague: <span id="infoVague"> </span></br>
Ennemis restant: <span id="infoEnnemy"> </span></br>
Ennemis tués: <span id="infoEnnemy2"> </span> </br>
Score: <span id="infoScore"> </span>
</p>
</div>
<div id="playground">
<!-- Tous les éléments du jeu viendront automatiquement se placer ici -->
<div id="welcomeScreen">
<div style="position: absolute;width: 700px; color: white;">
<center>
<a style="cursor: pointer;" id="startbutton">
<img src="assets/img/background/GameStart.jpg" name="xFighter">
</a>
</center>
</div>
</div>
</div>
<script src=lib/jquery.js></script> <!-- import jquery-->
<script src=lib/querygame.js></script> <!-- import querygame-->
<script src=app/bot.js></script> <!-- import querygame-->
<script src=app/player.js></script> <!-- import querygame-->
<script src=app/background.js></script>
<!--main script -->
<script>
var b = 0;
initBackGround();
initPlayer();
initBot1(nbrEnnemy1);
$("#explosion21").x(-255, false);
$("#explosion").x(-191, false);
$("#explosion21").setAnimation(explosion2);
$("#explosion").setAnimation(explosion);
initCloud(nbrCloud);
//function for animations
$.playground().registerCallback(function () {
moveFighter();
moveBackground();
moveEnnemy1();
moveMissile();
moveCloud(nbrCloud);
collisionMwE();
collicionFwE();
}, 30); // called every 30ms
start();
</script>
</body>
</html>