[WIP] Treballant en el jefe. Dispar complet
This commit is contained in:
32
data/imp.lua
32
data/imp.lua
@@ -500,6 +500,17 @@ if DEBUG_FN_NAME then print("shot") end
|
||||
self:do_flip(abad)
|
||||
self.flip_wait=100
|
||||
print("FIREBALL!!")
|
||||
|
||||
local flip = false
|
||||
local x_ini = self.x+self.bb.x+self.bb.w+4
|
||||
if self.x>abad.x then
|
||||
flip=true
|
||||
x_ini = self.x-4
|
||||
end
|
||||
local hab, tx, ty, off_x, off_y = coords.world_to_tile(x_ini,self.y+(self.h/2))
|
||||
fireball.init(hab, tx, ty, flip, off_x, off_y)
|
||||
sound.play(audio_hit)
|
||||
|
||||
self.shot_cooldown = 500
|
||||
end
|
||||
|
||||
@@ -1029,26 +1040,5 @@ if DEBUG_FN_NAME then print("move "..self.fight_mode) end
|
||||
--
|
||||
-- imp.step=(imp.step+1)%4
|
||||
-- imp.frame=imp.anim[imp.step+1]
|
||||
--
|
||||
-- if imp.flip then
|
||||
-- imp.x=imp.x-2
|
||||
-- if imp.x==78 then
|
||||
-- fireball.init(imp.hab,imp.x+8,imp.y+4,imp.flip)
|
||||
-- sound.play(audio_hit)
|
||||
-- imp.flip=not imp.flip
|
||||
-- elseif imp.x==-12 then
|
||||
-- imp.reset()
|
||||
-- end
|
||||
-- else
|
||||
-- imp.x=imp.x+2
|
||||
-- if imp.x==4 then
|
||||
-- fireball.init(imp.hab,imp.x+8,imp.y+4,imp.flip)
|
||||
-- sound.play(audio_hit)
|
||||
-- imp.flip=not imp.flip
|
||||
-- elseif imp.x==92 then
|
||||
-- imp.reset()
|
||||
-- end
|
||||
-- end
|
||||
--
|
||||
--end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user