summary refs log tree commit diff
path: root/lib/player.fnl
diff options
context:
space:
mode:
authorequa <equaa@protonmail.com>2021-04-20 18:20:05 -0500
committerequa <equaa@protonmail.com>2021-04-20 18:20:05 -0500
commitc9b60c569f2ad015f043667c44ff9f43d50ec2e5 (patch)
treef4a3bb3f363a5a3c9200bc8ee5a9eab408085a1c /lib/player.fnl
parent00af64d4e503dd82abf4657ec6fd44b0a418adb2 (diff)
death screen
Diffstat (limited to 'lib/player.fnl')
-rw-r--r--lib/player.fnl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/player.fnl b/lib/player.fnl
index 8e31a18..5fca05a 100644
--- a/lib/player.fnl
+++ b/lib/player.fnl
@@ -8,7 +8,7 @@
   (setmetatable {entity.position pos
                  entity.velocity {:x 0 :y 0}
                  :target-spin 0
-                 :shot-age 0
+                 :shot-age 20
                  :direction 0}
                 self))
 
@@ -37,8 +37,8 @@
       (entity.init
         bullet
         (vec.clone (entity.position self))
-        {:x (+ (* (math.cos self.direction) 0.6))
-         :y (+ (* (math.sin self.direction) 0.6))}))))
+        {:x (+ v.x (* (math.cos self.direction) 0.6))
+         :y (+ v.y (* (math.sin self.direction) 0.6))}))))
 
 (fn draw [self game id]
   (love.graphics.setColor 1 1 1)