From d699b9a38da59bc32982db0c8a69c02cd595cdbc Mon Sep 17 00:00:00 2001 From: equa Date: Thu, 22 Apr 2021 14:23:39 -0500 Subject: better? bullet rendering --- lib/player.fnl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lib/player.fnl') 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) -- cgit 1.3.0-6-gf8a5