-[NEW] Retras aleatori per a les gotes
-[FIX] Arreglada representació gràfica de les gotes en l'editor
This commit is contained in:
@@ -1,21 +1,16 @@
|
||||
|
||||
function ia.update_gota(spr)
|
||||
if spr.timer > 0 then
|
||||
spr.invisible = true
|
||||
spr.timer = spr.timer-1
|
||||
if spr.timer == 1 then
|
||||
spr.animation_finished = nil
|
||||
spr.current_frame = 1
|
||||
spr.current_wait = 1
|
||||
end
|
||||
return
|
||||
else
|
||||
spr.invisible = nil;
|
||||
if spr.animation_finished then
|
||||
if spr.current_frame==2 then
|
||||
local gota = templates.create("gota_caiguent", {pos={x=spr.pos.x, y=spr.pos.y}, flipped=spr.flipped})
|
||||
table.insert(sprites.list, gota)
|
||||
spr.animation_finished = nil
|
||||
spr.current_frame = 1
|
||||
spr.current_wait = 1
|
||||
--spr.animation_finished = nil
|
||||
--spr.current_frame = 1
|
||||
--spr.current_wait = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user