Renamed pause.lua to ui.lua; adjusted accordingly.
This commit is contained in:
@@ -13,8 +13,9 @@ Particle = Entity:New(x,y)
|
||||
o.sprite_scale = particle_data.sprite_scale or o.sprite_scale
|
||||
o.sprite_tint = particle_data.sprite_tint or o.sprite_tint
|
||||
o.sprite_alpha = particle_data.sprite_alpha or o.sprite_alpha
|
||||
o.sprite_flip = particle_data.sprite_flip or o.sprite_flip
|
||||
o.sprite_alpha_base = o.sprite_alpha
|
||||
|
||||
o.sprite_flip = particle_data.sprite_flip or o.sprite_flip
|
||||
o.animation_active = particle_data.animation_active or false
|
||||
|
||||
o.time = 0.5
|
||||
@@ -63,7 +64,7 @@ end
|
||||
function Particle:HandleAnimation()
|
||||
self.body:Animate()
|
||||
self.timer = self.timer + current_dt
|
||||
self.sprite_alpha = (self.time-self.timer)/self.time
|
||||
self.sprite_alpha = self.sprite_alpha_base*(self.time-self.timer)/self.time
|
||||
if self.light ~= nil then
|
||||
self.light.range = self.lightRange * self.sprite_alpha/2
|
||||
end
|
||||
|
||||
@@ -129,6 +129,7 @@ function Player:DoPhysics()
|
||||
local particle_data = {
|
||||
animation = self.body,
|
||||
sprite_tint = HEX2RGB("#fed100"),
|
||||
sprite_alpha = 0.5,
|
||||
sprite_flip = {
|
||||
x = self.sprite_flip.x,
|
||||
y = self.sprite_flip.y
|
||||
|
||||
Reference in New Issue
Block a user