-
Notifications
You must be signed in to change notification settings - Fork 0
/
pongoriginal.kv
152 lines (134 loc) · 3.3 KB
/
pongoriginal.kv
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#:kivy 1.0.9
<PongBall>:
size: 100, 100
canvas:
Ellipse:
pos: self.pos
size: self.size
source: 'assets/images/saturn2.png'
<PongRocket>:
size: 100, 100
canvas.before:
PushMatrix
Rotate:
axis: 0,0,1
angle: self.anglerocket
origin: self.center
canvas:
Ellipse:
pos: self.pos
size: self.size
source: 'assets/images/spaceship1.png'
canvas.after:
PopMatrix
<PongBullet>:
size: 50, 50
canvas.before:
PushMatrix
Rotate:
axis: 0,0,1
angle: self.anglebullet
origin: self.center
canvas:
Ellipse:
pos: self.pos
size: self.size
source: 'assets/images/bullet1.png'
canvas.after:
PopMatrix
<PongAlienship>:
size: 75, 75
canvas.before:
PushMatrix
Rotate:
axis: 0,0,1
origin: self.center
angle: self.angleenemy
canvas:
Ellipse:
pos: (self.pos[0],self.pos[1])
size: self.size
source: 'assets/images/spaceship.png'
canvas.after:
PopMatrix
<PongFire>:
size: 75, 75
canvas:
Ellipse:
pos: self.pos
size: self.size
source: 'assets/images/fire.png'
<PongLightning>:
size: 75, 75
canvas.before:
PushMatrix
Rotate:
axis: 0,0,1
origin: self.center
angle: self.anglelightning
canvas:
Ellipse:
pos: self.pos
size: self.size
source: 'assets/images/explosion2.png'
canvas.after:
PopMatrix
<PongShark>:
size: 120, 120
canvas:
Ellipse:
pos: (self.pos[0]+300,self.pos[1]+50)
size: self.size
source: 'assets/images/ninja.png'
<PongPaddle>:
size: 25, 200
canvas:
Rectangle:
pos:self.pos
size:self.size
<PongGame>:
ball1: pong_ball1
spaceship2: pong_rocket
alienship3: pong_alienship
bullet4: pong_bullet
lightning5: pong_lightning
fire6: pong_fire
shark7: pong_shark
canvas:
Rectangle:
pos: self.pos
size: self.width, self.height
source: 'assets/images/galaxy2.jpg'
Color:
rgba: 1,1,1,.5
Label:
font_size: 30
center_x: root.width / 8
top: root.top - 50
text: "BadPlanet"
Label:
font_size: 20
center_x: root.width * 4 / 5
top: root.top - 50
text: "Score:"+str(self.parent.spaceship2.score) + " / Health:" + str(self.parent.spaceship2.health)
PongBall:
id: pong_ball1
center: self.parent.center
PongRocket:
id: pong_rocket
center: self.parent.center
PongBullet:
id: pong_bullet
center: self.parent.center
PongAlienship:
id: pong_alienship
center: self.parent.center
PongLightning:
id: pong_lightning
center: self.parent.center
PongFire:
id: pong_fire
center: self.parent.center
PongShark:
id: pong_shark
center: self.parent.center