-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample1.js
executable file
·42 lines (32 loc) · 909 Bytes
/
sample1.js
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
window.onload = function() {
(function(){
for (var i = 0; i < 1; i++) {
setTimeout(function () {
var Mario_or_Luigi = (parseInt(Math.random() * 100) % 2) ? Mario : Luigi;
var status = (parseInt(Math.random() * 100) % 2) ? 'SUPER' : 'MINI';
var x = Math.random() * 600;
var y = 240 + parseInt((Math.random() - .5) * 240);
var mario = new Mario_or_Luigi({
x: x,
y: y,
scale: 2,
ability: {
accel: .25,
bdash: 2,
jump: 6
},
environment: new Mario.Environment({
gravity: 9.8
})
,status: status
});
var controller_mario = new Mario.Controller({
target: mario
});
setTimeout(function() {
mario.JUMP();
}, 0);
}, 0);
}
})();
};