-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblip.kv
609 lines (548 loc) · 13.8 KB
/
blip.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
#:kivy 1.9.1
<AimBall>:
size: root.parent.width * 0.025,0
canvas.before:
PushMatrix
Rotate:
angle: -self.rotation
origin: self.center_x,self.y
Color:
rgba: 1,1,1,1
Rectangle:
source: 'assets/pointers/pointer_circle.png'
pos: self.pos
size: self.size
canvas.after:
PopMatrix
<Ball>:
size: root.parent.width * 0.05,root.parent.width * 0.05
canvas.before:
PushMatrix
Rotate:
angle: self.rotation
origin: self.center
Color:
rgba: 1,1,1,1
Ellipse:
source: self.tex
size: self.size
pos: self.pos
canvas.after:
PopMatrix
<Platform>:
size: root.parent.width * 1 / 6,root.parent.height * 0.02
canvas.before:
PushMatrix
Rotate:
angle: self.rotation*180
origin: self.center_x,self.y
Color:
rgb: 1,1,1,1
Rectangle:
source: self.tex
pos: self.pos
size: self.size
canvas.after:
PopMatrix
<Spike>:
size: root.parent.width * 1 / 18,root.parent.width * 1 / 18
canvas:
Color:
rgba: 1,1,1,1
Ellipse:
source: 'assets/levels/spike.png'
pos: self.pos
size: self.size
<Coin>:
size: root.parent.width * 1 / 18,root.parent.width * 1 / 18
canvas:
Color:
rgba: 1,1,1,1
Ellipse:
source: 'assets/levels/coin.png'
pos: self.pos
size: self.size
<BlipGame>:
platform: platform
ball: ball
aimball: aimball
debug: debug
tutorial: tutorial
tutorial2: tutorial2
coin: coin
s1: spike1
s2: spike2
s3: spike3
s4: spike4
s5: spike5
s6: spike6
s7: spike7
s8: spike8
s9: spike9
s10: spike10
canvas:
Color:
rgba: 1,1,1,0.1
Rectangle:
size: self.size
pos: 0,0
Color:
rgba: 1,1,1,0.05
Rectangle:
size: self.width,6
pos: 0,self.height * 0.1 - 3
AimBall:
id: aimball
y: ball.center_y
center_x: ball.center_x
Ball:
id: ball
center: root.width * 1 / 8, root.height * 0.1
Platform:
id: platform
pos: 0,root.height * 8 / 10
Coin:
id: coin
pos: 0-self.width,0-self.height
Spike:
id: spike1
pos: -root.width,-root.height
Spike:
id: spike2
pos: -root.width,-root.height
Spike:
id: spike3
pos: -root.width,-root.height
Spike:
id: spike4
pos: -root.width,-root.height
Spike:
id: spike5
pos: -root.width,-root.height
Spike:
id: spike6
pos: -root.width,-root.height
Spike:
id: spike7
pos: -root.width,-root.height
Spike:
id: spike8
pos: -root.width,-root.height
Spike:
id: spike9
pos: -root.width,-root.height
Spike:
id: spike10
pos: -root.width,-root.height
Label:
center: root.width / 2,root.height * 0.8
font_name: 'odin'
text: str(platform.rotation)
font_size: root.width / 10
Label:
id: debug
pos: 0,root.height-self.height
text: ''
font_size: 10
Label:
font_size: root.width * 1 / 24
font_name: 'gemelli'
text: 'Your goal is\nto reach the\nplatform'
id: tutorial
pos: root.width * 1 / 12,root.height * 0.6
halign: 'center'
Label:
id: tutorial2
font_size: root.width * 0.025
font_name: 'gemelli'
center: root.center_x,root.center_y * 9 / 10
text: 'Tap and hold to aim the ball'
<Title>:
size: root.parent.width * 1 / 2,root.parent.width * 1 / 3
canvas:
Color:
rgba: 1,1,1,1
Rectangle:
source: 'assets/gui/blip_title.png'
size: self.size
pos: self.pos
<Dot>:
size: root.parent.width * 1 / 20,root.parent.width * 1 / 20
canvas:
Color:
rgba: 1,1,1,1
Ellipse:
source: 'assets/gui/blip_title_dot.png'
size: self.size
pos: self.pos
<Speaker>:
size: root.parent.width * 1 / 12,root.parent.width * 1 / 12
Button:
background_color: 0,0,0,0
on_press: self.parent.no_audio()
pos: self.parent.pos
size: self.parent.size
canvas:
Color:
rgba: 1,1,1,1
Ellipse:
pos: self.parent.pos
size: self.parent.size
source: self.parent.speaker_source
<Music>:
size: root.parent.width * 1 / 12,root.parent.width * 1 / 12
Button:
background_color: 0,0,0,0
on_press: self.parent.no_audio()
pos: self.parent.pos
size: self.parent.size
canvas:
Ellipse:
pos: self.parent.pos
size: self.parent.size
source: self.parent.speaker_source
<LinkButton>:
img: self.img
url: self.url
col: self.col
size: root.parent.width * 1 / 12,root.parent.width * 1 / 12
Button:
background_color: 0,0,0,0
on_press: self.parent.link(self.parent.url)
pos: self.parent.pos
size: self.parent.size
canvas:
Color:
rgba: self.parent.col
Ellipse:
pos: self.parent.pos
size: self.parent.size
Color:
rgba: 1,1,1,1
Ellipse:
pos: self.parent.pos
size: self.parent.size
source: self.parent.img
<InfoButton>:
size: root.parent.width * 1 / 12, root.parent.width * 1 / 12
Button:
background_color: 0,0,0,0
on_press: self.parent.change()
pos: self.parent.pos
size: self.parent.size
canvas:
Color:
rgba: 1,1,1,1
Ellipse:
pos: self.parent.pos
size: self.parent.size
texture: self.parent.icon.texture
<BackButton>:
size: root.parent.width * 1 / 20,root.parent.width * 1 / 20
Button:
background_color: 0,0,0,0
on_press: self.parent.back()
pos: self.parent.pos
size: self.parent.size
canvas:
Color:
rgba: 1,1,1,1
Rectangle:
pos: self.parent.pos
size: self.parent.size
source: 'assets/gui/back.png'
<TitleCanvas>:
label_1: label_1
canvas:
Color:
rgba: 1,1,1,0.1
Rectangle:
size: self.width,self.height
pos: 0,0
Title:
id: title
center: root.center_x,root.height * 3 / 4
Dot:
id: dot
center: title.center_x + title.center_x * 1 / 16,title.y + title.height * 7 / 8
LinkButton:
img: 'assets/gui/no_ads.png'
url: 'https://play.google.com/store/apps/details?id=org.swappt.blipapppaid'
center: root.width * 0.24,root.height * 0.15
InfoButton:
center: root.width * 0.42, root.height * 0.15
Music:
center: root.width * 0.58,root.height * 0.15
Speaker:
center: root.width * 0.76,root.height * 0.15
Button:
background_color: 0,0,0,0
on_press: self.parent.play()
center: root.center_x, root.center_y * 0.8
size: root.width * 0.65,root.height * 0.15
canvas:
Color:
rgba: 0.133,0.709,0.45,1
RoundedRectangle:
size: root.width * 0.6,root.height * 1 / 8
pos: root.width * 0.2,root.height * 0.4
radius: [(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4)]
Label:
text: 'PLAY'
id: label_1
font_name: 'odin'
color: 1,1,1,1
font_size: self.parent.width * 1 / 6
center: root.center_x,root.center_y * 0.905
Button:
background_color: 0,0,0,0
on_press: self.parent.nav('store')
center: root.center_x, root.center_y * 0.5
size: root.width * 0.65,root.height * 0.15
canvas:
Color:
rgba: 0,0.66,0.615,1
RoundedRectangle:
size: root.width * 0.6,root.height * 1 / 8
pos: root.width * 0.2,root.height * 0.25
radius: [(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4)]
Label:
text: 'STORE'
font_name: 'odin'
color: 1,1,1,1
font_size: self.parent.width * 1 / 6
center: root.center_x,root.center_y * 0.605
<ContinueButton>:
Button:
size: self.parent.size
pos: self.parent.pos
background_color: (0, 0, 0, 0)
on_press: self.parent.back()
canvas:
Color:
rgba: 1,1,1,1
Ellipse:
pos: self.parent.pos
size: self.parent.size
angle_start: self.parent.start_angle
angle_end: 360
Color:
rgba: 0.1,0.1,0.1,1
Ellipse:
pos: self.parent.x + 10, self.parent.y + 10
size: self.parent.width - 20, self.parent.height - 20
<GameOver>:
hs: hs
current: current
continuebutton: continuebutton
canvas:
Color:
rgba: 1,1,1,0.1
Rectangle:
size: self.width,self.height
pos: 0,0
Label:
id: current
text: 'YOU SCORED 0'
font_name: 'odin'
center: root.center_x,root.height * 7 / 8
font_size: root.width * 1 / 9
Label:
id: hs
text: 'BEST: ' + str(self.parent.d.get('highscore')['value'])
font_name: 'odin'
center: root.center_x,root.height * 6 / 8
font_size: root.width * 1 / 12
ContinueButton:
contlabel: contlabel
label: label
id: continuebutton
size: root.width * 0.2, root.width * 0.2
pos: root.center_x - root.width * 1 / 12,root.height * 9 / 16 - root.width * 1 / 12
Label:
id: contlabel
halign: 'center'
text: 'CONTINUE\nPLAYING'
font_name: 'odin'
font_size: self.parent.width * 1 / 6
center: self.parent.center
Label:
id: label
halign: 'center'
text: 'NO MORE\nRETRIES TODAY'
font_name: 'odin'
font_size: self.parent.width * 1 / 6
center: self.parent.center
opacity: 0
Button:
background_color: (0, 0, 0, 0)
on_press: self.parent.play()
center: root.center_x, root.center_y * 0.6
size: root.width * 0.8,root.height * 0.2
canvas:
Color:
rgba: 0.133,0.709,0.45,1
RoundedRectangle:
size: root.width * 0.6,root.height * 1 / 8
pos: root.width * 0.2,root.height * 0.3
radius: [(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4)]
Label:
text: 'REPLAY'
font_name: 'odin'
color: 1,1,1,1
font_size: self.parent.width * 1 / 6
center: root.center_x,root.center_y * 68 / 97
Button:
background_color: (0, 0, 0, 0)
on_press: self.parent.nav('menu')
center: root.center_x, root.center_y * 0.2
size: root.width * 0.8,root.height * 0.2
canvas:
Color:
rgba: 0,0.66,0.615,1
RoundedRectangle:
size: root.width * 0.6,root.height * 1 / 8
pos: root.width * 0.2,root.height * 0.1
radius: [(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4),(self.height * 1/4,self.height * 1/4)]
Label:
text: 'MENU'
font_name: 'odin'
color: 1,1,1,1
font_size: self.parent.width * 1 / 6
center: root.center_x,root.center_y * 57 / 190
<StoreScreen>:
scroll: scroll
coincounter: coincounter
canvas:
Color:
rgba: 1,1,1,0.1
Rectangle:
pos: 0,0
size:self.width,self.height
Color:
rgba: 1,1,1,1
Rectangle:
size:self.width * 0.6,self.width * 0.2
pos:self.width * 0.2,self.height - self.width * 0.25
source:'assets/store/title.png'
Color:
rgba: 0,0,0,1
Rectangle:
size: self.width,self.width * 0.1333
pos: 0,self.height - self.width * 0.25 - self.width * 0.1333 - self.height * 1 / 100
BackButton:
id: back
pos:0,root.height-self.height
AdButton:
size: root.width * 0.4, root.width * 0.1333
pos: root.width * 0.3,root.height - root.width * 0.25 - root.width * 0.1333 - root.height * 1 / 100
StoreScroll:
id: scroll
size: root.width, root.height
pos: 0,0
Label:
id: coincounter
text:'COINS: 0'
font_name:'odin'
font_size: root.height * 1 / 16
center: root.center_x,root.center_y + root.height * 1 / 24
<AdButton>:
size: self.size
pos: self.pos
Button:
background_color: 0,0,0,0
on_press: self.parent.do_ad()
pos: self.parent.pos
size: self.parent.size
canvas:
Color:
rgba: 1,1,1,1
Rectangle:
pos: self.parent.pos
size: self.parent.size
source: self.parent.img
<StoreScroll>:
size: self.size
pos: self.pos
<StoreButtons>:
size: self.size
Button:
background_color: 0,0,0,0
on_press: self.parent.purchase()
pos: self.parent.pos
size: self.parent.size
height: self.width
canvas:
Color:
rgba: 1,1,1,1
Ellipse:
pos: self.parent.pos
size: self.parent.size
source: self.parent.tex
Ellipse:
pos: self.parent.x - self.parent.width * 0.025,self.parent.y - self.parent.height * 0.025
size: self.parent.width * 1.05,self.parent.height * 1.05
source: self.parent.lock
<Tutorial>:
size: self.size
pos: self.pos
canvas:
Color:
rgba: 1,1,1,1
Ellipse:
texture: self.tut.texture
pos: self.pos
size: self.width,self.width
<Information>:
tut: tut
canvas:
Color:
rgba: 1,1,1,0.1
Rectangle:
pos: 0,0
size: root.size
BackButton:
id: back
pos:0,root.height-self.height
Tutorial:
id: tut
size: root.width * 0.8,root.width*0.8
pos: root.width * 0.1,root.height - root.width * 0.9
LinkButton:
img: 'assets/gui/twitter.png'
url: 'https://twitter.com/swapptorg'
pos: root.width * 1 / 8 + self.width + 10,root.height * 0.02
LinkButton:
img: 'assets/gui/instagram.png'
url: 'https://instagram.com/swapptorganisation'
pos: root.width * 1 / 8,root.height * 0.02
LinkButton:
img: 'assets/gui/playstore_button.png'
url: 'https://play.google.com/store/apps/details?id=org.swappt.blipapp'
pos: root.width * 3 / 8,root.height * 0.02
<Manager>:
go: GOmenu
menu: menu
game: game
store: store
info: info
Screen:
name: 'menu'
TitleCanvas:
id: menu
Screen:
name: 'GOmenu'
GameOver:
id: GOmenu
Screen:
name: 'game'
BlipGame:
id: game
Screen:
name: 'store'
StoreScreen:
id: store
Screen:
name: 'info'
Information:
id: info