-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkivybird.kv
73 lines (66 loc) · 1.72 KB
/
kivybird.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
#<Bird>:
# canvas.before:
# PushMatrix
# Rotate:
# angle: root.angle
# axis: (0, 0, 1)
# origin: root.center
# canvas.after:
# PopMatrix
<Pipe>:
canvas:
Rectangle:
pos: (self.x + 4, self.FLOOR)
size: (56, self.lower_len)
texture: self.tx_pipe
tex_coords: self.lower_coords
Rectangle:
pos: (self.x, self.FLOOR + self.lower_len)
size: (64, self.PTOP_HEIGHT)
texture: self.tx_ptop
Rectangle:
pos: (self.x +4, self.upper_y)
size: (56, self.upper_len)
texture: self.tx_pipe
tex_coords: self.upper_coords
Rectangle:
pos: (self.x, self.upper_y - self.PTOP_HEIGHT)
size: (64, self.PTOP_HEIGHT)
texture: self.tx_ptop
size_hint: (None, 1)
width: 64
FloatLayout:
id: main_layout
Background:
id: background
canvas:
Rectangle:
pos: self.pos
size: (self.width, self.height)
texture: self.tx_background
Bird:
id: bird
pos: (250, 250)
# pos_hint: {'center_x': 0.3333, 'center_y': 0.6}
size: (50, 50)
size_hint: (None, None)
source: 'images/spaceship1_big2.png'
Fish:
id: fish
size: (100, 50)
size_hint: (None, None)
pos: (root.width- 50, 250)
source: 'images/goldfish.png'
Label:
id: score_label
text: "0"
font_size: 75
y: 250
Label:
id: gameover_label
text: ""
font_size: 50
Label:
id: highscore_label
font_size: 50
y: -250