-
Notifications
You must be signed in to change notification settings - Fork 0
/
yet.kv
57 lines (48 loc) · 1.32 KB
/
yet.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
#:kivy 1.7.0
<MainWindow>:
player: player
Label:
text: str(self.parent.player.lives)
Label:
text: str(self.parent.player.coins)
x: 100
Label:
text: str(self.parent.player.immortal)
x: 200
Player:
x: 10
y: 100
id: player
pos: self.parent.width * 0.05, self.parent.height * 0.2
size: self.parent.size[1] // 14, self.parent.size[1] // 10
<Player>:
offset: self.parent.size[1] // 7
canvas:
Rectangle:
pos: self.pos
# size: self.parent.size[1] // 7, self.parent.size[1] // 7
size: self.size
Rectangle:
pos: self.pos[0] - self.offset // 2, self.pos[1]
size: self.offset, self.offset
source: 'Art/monster_5_2_1.png'
<Obstacle>:
size: 0, 0
# factor: self.parent.size[1]
canvas:
Color:
rgb: 1, 0, 0
Line:
points: self.pos[0], self.pos[1], self.pos[0] + self.factor, self.pos[1], self.pos[0] + self.factor//2, self.pos[1] - self.factor//3
# size: self.size
close: True
# Rectangle:
# pos: self.pos
# size: self.size
<Coin>:
canvas:
Color:
rgb: 1, 1, 0
Ellipse:
pos: self.pos
size: self.size