edtris/game/entities/bomberman.fnl
2021-02-07 16:56:19 -05:00

13 lines
378 B
Fennel

(local Entity (require :game.entity))
(local rules (require :game.rules))
(local Bomberman (Entity:extend))
(set Bomberman.keymap {:up :w :down :s :left :a :right :d :bomb :x})
(set Bomberman.color [0.2 0.2 0.2])
(fn Bomberman.update [self dt]
(Bomberman.super.update self dt)
(when (love.keyboard.isDown self.keymap.bomb)
(rules.place-bomb self.x self.y)))
Bomberman