diff --git a/data/maps/rooms_foreground.gif b/data/maps/rooms_foreground.gif index dc5ea18..b54e58b 100644 Binary files a/data/maps/rooms_foreground.gif and b/data/maps/rooms_foreground.gif differ diff --git a/data/maps/rooms_items.gif b/data/maps/rooms_items.gif index fc1a2d8..0dd3250 100644 Binary files a/data/maps/rooms_items.gif and b/data/maps/rooms_items.gif differ diff --git a/data/modules/animations.lua b/data/modules/animations.lua index 8afe30c..02b29ca 100644 --- a/data/modules/animations.lua +++ b/data/modules/animations.lua @@ -206,16 +206,16 @@ animations = { }, ["gota_generador"] = { cycle = {1,2,3,4,5,6,7,8}, - loop = false, + loop = true, frames = { + { frame={x=48,y=0,w=8,h=8}, wait=50 }, + { frame={x=48,y=0,w=8,h=8}, wait=1 }, { frame={x=0,y=0,w=8,h=8}, wait=2 }, { frame={x=8,y=0,w=8,h=8}, wait=2 }, { frame={x=16,y=0,w=8,h=8}, wait=2 }, { frame={x=24,y=0,w=8,h=8}, wait=2 }, { frame={x=32,y=0,w=8,h=8}, wait=2 }, { frame={x=40,y=0,w=8,h=8}, wait=2 }, - { frame={x=48,y=0,w=8,h=8}, wait=50 }, - { frame={x=48,y=0,w=8,h=8}, wait=1 } } }, ["gota"] = { diff --git a/data/modules/ia/gota.lua b/data/modules/ia/gota.lua index 21c2753..9a41e91 100644 --- a/data/modules/ia/gota.lua +++ b/data/modules/ia/gota.lua @@ -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 diff --git a/data/modules/templates.lua b/data/modules/templates.lua index aa7a977..5dc2da4 100644 --- a/data/modules/templates.lua +++ b/data/modules/templates.lua @@ -205,7 +205,7 @@ function me.create(type, options) animation = "gota_generador", state = me.ALIVE, enemy = true, - timer = 0, + timer = math.random(0,100), room = options.room, ia = ia.update_gota }