-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGameTest.txt
66 lines (56 loc) · 1.22 KB
/
GameTest.txt
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
images C:\Users\waldohp\Desktop\Files\Projects\WUI Engine\SpaceInvaders\
Camera:
camera-follow localPlayer
Player:
boxCollider
topDownPlayer
texture player.png
size 64 64
position 0 0
player-speed 300 300
@type 0
PushableBlock:
boxCollider
texture alien.png
size 32 32
position 0 400
@type 1
@diffX 0
@diffY 0
onCollisionStay
this@diffX = getX this@object; - getX other@object;;
this@diffY = getY this@object; - getY other@object;;
this@magX = this@diffX;
if this@magX < 0: this@magX = this@magX * 0-1;
this@magY = this@diffY;
if this@magY < 0: this@magY = this@magY * 0-1;
if this@magX > 0: this@diffX = this@diffX / this@magX;
if this@magY > 0: this@diffY = this@diffY / this@magY;
if this@magX > this@magY:
move this@object this@diffX*1 0;
if this@magX < this@magY:
move this@object 0 this@diffY*1;
Wall:
boxCollider
texture alien.png
size 32 512
position 300 -100
@type 2
Wall2:
boxCollider
texture alien.png
size 32 512
position -100 -100
@type 2
BouncyBall:
boxCollider
texture bullet.png
size 32 32
position 0 200
@type 3
@velX 5
onUpdate move this@object this@velX 0
onCollisionStay
this@velX = this@velX * 0-1
if other@type == 0:
teleport other@object 0 0;