Compare commits

..

2 Commits

Author SHA1 Message Date
Tangent
a7bba2c44b improved 2019-05-16 13:15:51 -07:00
Tangent
e48ed3ed29 ignore .lua 2019-05-16 13:00:32 -07:00
2 changed files with 6 additions and 2 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
!src/lume.lua
*.lua

View File

@ -49,16 +49,18 @@ love.draw = ->
-- radar blips
for contact in *contacts
love.graphics.setColor contact.color
if m / scale / 2 >= dist me, contact
if (m - 42) / scale / 2 >= dist me, contact
love.graphics.circle "fill", w / 2 + (contact.x - me.x) * scale, h / 2 + (contact.y - me.y) * scale, 1.4
else
r = math.atan2 contact.y - me.y, contact.x - me.x
love.graphics.circle "fill", w / 2 + math.cos(r) * m / 2, h / 2 + math.sin(r) * m / 2, 2
love.graphics.circle "fill", w / 2 + math.cos(r) * (m - 42) / 2, h / 2 + math.sin(r) * (m - 42) / 2, 2
-- actual vessels
for contact in *contacts
love.graphics.setColor contact.color
love.graphics.circle "fill", w / 2 + contact.x - me.x, h / 2 + contact.y - me.y, 4
-- dias
love.graphics.setColor 1, 1, 1, 0.5
r = m / 2 - 25
love.graphics.circle "line", w / 2, h / 2, r