diff options
author | equa <equaa@protonmail.com> | 2021-04-22 14:23:39 -0500 |
---|---|---|
committer | equa <equaa@protonmail.com> | 2021-04-22 14:23:39 -0500 |
commit | d699b9a38da59bc32982db0c8a69c02cd595cdbc (patch) | |
tree | 37eba087eee569be5dca97bad25f29213df1f22b /lib/player.fnl | |
parent | 3c98f936af7754e9deb4912e54ec12a3df9b5938 (diff) |
better? bullet rendering
Diffstat (limited to 'lib/player.fnl')
-rw-r--r-- | lib/player.fnl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/player.fnl b/lib/player.fnl index 1b10b51..4693d2e 100644 --- a/lib/player.fnl +++ b/lib/player.fnl @@ -38,12 +38,18 @@ bullet (vec.clone (entity.position self)) {:x (+ v.x (* (math.cos self.direction) 0.6)) - :y (+ v.y (* (math.sin self.direction) 0.6))})))) + :y (+ v.y (* (math.sin self.direction) 0.6))} + self.direction)))) (fn draw [self game id] (love.graphics.setColor 1 1 1) (love.graphics.rotate self.direction) - (love.graphics.polygon :fill -0.6 -0.4 0.6 0 -0.6 0.4)) + (love.graphics.polygon :fill -0.6 -0.4 0.6 0 -0.6 0.4) + (love.graphics.setLineWidth 0.1) + ;; (love.graphics.setColor 1 1 1 0.4) + ;; (love.graphics.arc :line :open 0 0 1.5 -0.3 0.3 13) + ;; (love.graphics.line 1.4 0 1.6 0) + (love.graphics.circle :fill 0.9 0 0.1)) (fn collide [self game id x y] (tset game.entities id nil) |