Skip to content

Commit

Permalink
Fix guard bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandevai committed Apr 26, 2020
1 parent 4207dc8 commit 4ec0e28
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/main.fnl
Original file line number Diff line number Diff line change
Expand Up @@ -1314,10 +1314,12 @@
(global *guard* (deepcopy *enemy*))
(set *guard*.animator.animations.moving [ 304 ])
(set *guard*.health 10)
(set *guard*.tick 0)

(set *guard*.update
(fn [self]
(when ( = (% (+ *tick* (math.round self.x)) 60) 0)
(inc self.tick)
(when ( = (% self.tick 60) 0)
(var ball (spawn-enemy :energy-ball self.x self.y))
(set ball.animator.animations.moving [ 264 308 309 308 ])
(set ball.animator.speed 50)
Expand Down

0 comments on commit 4ec0e28

Please sign in to comment.