@@ -10,10 +10,49 @@ def on_up_pressed():
1010
1111def on_on_overlap (sprite , coll1 ):
1212 coll1 .destroy ()
13- info .change_life_by (- 1 )
1413 statusbar .value += - 30
1514sprites .on_overlap (SpriteKind .player , SpriteKind .projectile , on_on_overlap )
1615
16+ def on_a_pressed ():
17+ game .set_dialog_frame (img ("""
18+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
19+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
20+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
21+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
22+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
23+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
24+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
25+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
26+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
27+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
28+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
29+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
30+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
31+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
32+ 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
33+ """ ))
34+ game .set_dialog_text_color (5 )
35+ game .set_dialog_cursor (img ("""
36+ ..............................
37+ ..............................
38+ ..............................
39+ 777777777777777777777777......
40+ 7......................7......
41+ 7.111.111.1111.111.111.7......
42+ 7.1...1.1.1..1.1...1...7......
43+ 7.111.111.1..1.1...111.7......
44+ 7...1.1...1111.1...1...7......
45+ 7.111.1...1..1.111.111.7......
46+ 7......................7......
47+ 777777777777777777777777......
48+ ..............................
49+ ..............................
50+ ..............................
51+ """ ))
52+ game .show_long_text ("Welcome To The world of retro.\\ n Try to win as fast as possible.\\ n press space to START GAME" ,
53+ DialogLayout .CENTER )
54+ controller .A .on_event (ControllerButtonEvent .PRESSED , on_a_pressed )
55+
1756def on_overlap_tile (sprite , location ):
1857 game .over (True )
1958scene .on_overlap_tile (SpriteKind .player , sprites .builtin .brick , on_overlap_tile )
@@ -31,43 +70,6 @@ def on_hit_wall(sprite, location):
3170jumpcount = 0
3271statusbar : StatusBarSprite = None
3372jack : Sprite = None
34- game .set_dialog_frame (img ("""
35- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
36- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
37- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
38- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
39- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
40- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
41- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
42- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
43- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
44- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
45- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
46- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
47- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
48- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
49- 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
50- """ ))
51- game .set_dialog_text_color (5 )
52- game .set_dialog_cursor (img ("""
53- ..............................
54- ..............................
55- ..............................
56- 777777777777777777777777......
57- 7......................7......
58- 7.111.111.1111.111.111.7......
59- 7.1...1.1.1..1.1...1...7......
60- 7.111.111.1..1.1...111.7......
61- 7...1.1...1111.1...1...7......
62- 7.111.1...1..1.111.111.7......
63- 7......................7......
64- 777777777777777777777777......
65- ..............................
66- ..............................
67- ..............................
68- """ ))
69- game .show_long_text ("Welcome To The world of retro.\\ n Try to win as fast as possible.\\ n press space to START GAME" ,
70- DialogLayout .CENTER )
7173scene .set_background_color (9 )
7274tiles .set_tilemap (tilemap ("""
7375 level4
@@ -98,6 +100,10 @@ def on_on_update():
98100 """ ))
99101game .on_update (on_on_update )
100102
103+ def on_on_update2 ():
104+ pass
105+ game .on_update (on_on_update2 )
106+
101107def on_update_interval ():
102108 global coll1
103109 if game .runtime () > 3000 :
0 commit comments