-
Notifications
You must be signed in to change notification settings - Fork 0
/
car.kv
59 lines (54 loc) · 1.08 KB
/
car.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
#:kivy 1.0.9
# ref: https://kivy.org/docs/tutorials/pong.html
<Car>:
size: 20, 10
canvas:
PushMatrix
Rotate:
angle: self.angle
origin: self.center
Rectangle:
pos: self.pos
size: self.size
PopMatrix
<Ball1>:
size: 10,10
canvas:
Color:
rgba: 1,0,0,1
Ellipse:
pos: self.pos
size: self.size
<Ball2>:
size: 10,10
canvas:
Color:
rgba: 0,1,1,1
Ellipse:
pos: self.pos
size: self.size
<Ball3>:
size: 10,10
canvas:
Color:
rgba: 1,1,0,1
Ellipse:
pos: self.pos
size: self.size
<Game>:
car: game_car
ball1: game_ball1
ball2: game_ball2
ball3: game_ball3
Car:
id: game_car
center: self.parent.center
Ball1:
id: game_ball1
center: self.parent.center
Ball2:
id: game_ball2
center: self.parent.center
Ball3:
id: game_ball3
center: self.parent.center