X Tutup
Skip to content

Commit 1edcce2

Browse files
committed
tutorial image
1 parent 2fe4bed commit 1edcce2

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

img/tutorial.png

5.75 KB
Loading

img/tutorial.xcf

92.2 KB
Binary file not shown.

levels.moon

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ class World
108108
block_size: 300
109109
started: false
110110

111+
lazy_value @, "tutorial", -> imgfy "img/tutorial.png"
112+
111113
new: (@game, @player, level=Levels[1]) =>
112114
@entities = DrawList! -- things that collide
113115
@particles = DrawList! -- things that don't collide
@@ -117,7 +119,7 @@ class World
117119
@platform = Platform!
118120
@ground = Ground!
119121

120-
@particles\add EnemySpawner @
122+
-- @particles\add EnemySpawner @
121123

122124
@box = Box 0, 0, g.getWidth!, g.getHeight!
123125
@expanded_box = @box\pad -20
@@ -174,6 +176,9 @@ class World
174176

175177
g.setColor 255,255,255
176178

179+
unless @started
180+
@tutorial\draw 0,0, 0, 2,2
181+
177182
collides: (thing) =>
178183
@platform\collides thing
179184

main.moon

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Platform
7676
inner_width: 580
7777

7878
new: =>
79-
@ox, @oy = g.getWidth! / 2, g.getHeight! * (2/3)
79+
@ox, @oy = g.getWidth! / 2, g.getHeight! * .54
8080
@elapsed = 0
8181

8282
@hitbox = Box 0,0,450,120
@@ -284,6 +284,9 @@ class Game
284284
dispatch\push GameOver!
285285

286286
on_key: (key, code) =>
287+
if key == "return"
288+
@world.started = true
289+
287290
-- TODO: remove me
288291
if key == "f2"
289292
@player.life = 0

0 commit comments

Comments
 (0)
X Tutup