Fixed particles, reduced light radius of visible light
This commit is contained in:
@@ -28,9 +28,9 @@ end
|
||||
|
||||
function HookAnchor:DrawBackground()
|
||||
Entity.DrawBackground(self)
|
||||
love.graphics.setColor(1,1,1,1)
|
||||
love.graphics.setColor(1,1,1,0)
|
||||
love.graphics.circle(
|
||||
"line",
|
||||
"fill",
|
||||
-Camera.pos.x + self.pos.x,
|
||||
-Camera.pos.y + self.pos.y,
|
||||
self.hookDistance
|
||||
|
||||
@@ -199,6 +199,16 @@ function Player:DoPhysics()
|
||||
if self.isHooked then
|
||||
local hook = Vector(self.pos.x, self.pos.y, self.hookAnchor.x, self.hookAnchor.y)
|
||||
if GetVectorValue(hook) > self.hookDistance then
|
||||
local hook_angle = GetAngleFromVector(hook[1],hook[2])-math.rad(180)
|
||||
if Keybind:CheckDown(Keybind.move.right) then
|
||||
hook_angle = hook_angle - math.rad(0.05)
|
||||
self.move_x = 0
|
||||
end
|
||||
if Keybind:CheckDown(Keybind.move.left) then
|
||||
hook_angle = hook_angle + math.rad(0.05)
|
||||
self.move_x = 0
|
||||
end
|
||||
|
||||
local particle_data = {
|
||||
animation = self.body,
|
||||
sprite_tint = HEX2RGB("#fed100"),
|
||||
@@ -209,15 +219,7 @@ function Player:DoPhysics()
|
||||
}
|
||||
}
|
||||
Particle:New(self.pos.x,self.pos.y,particle_data)
|
||||
local hook_angle = GetAngleFromVector(hook[1],hook[2])-math.rad(180)
|
||||
if Keybind:CheckDown(Keybind.move.right) then
|
||||
hook_angle = hook_angle - math.rad(0.05)
|
||||
self.move_x = 0
|
||||
end
|
||||
if Keybind:CheckDown(Keybind.move.left) then
|
||||
hook_angle = hook_angle + math.rad(0.05)
|
||||
self.move_x = 0
|
||||
end
|
||||
|
||||
local pos_x = self.hookAnchor.x + self.hookDistance * math.cos(hook_angle)
|
||||
local pos_y = self.hookAnchor.y + self.hookDistance * math.sin(hook_angle)
|
||||
self.vel.x = self.vel.x + pos_x - self.pos.x
|
||||
|
||||
Reference in New Issue
Block a user