[NEW] Llibre de tècniques
[NEW] Escena llibre [NEW] El abad dispara en l'aire
This commit is contained in:
@@ -46,6 +46,7 @@ function abad_init()
|
||||
draw=abad.draw,
|
||||
hurting=0,
|
||||
update=nil,
|
||||
save_update=nil,
|
||||
jumpfwd=false,
|
||||
step_length=1,
|
||||
vmove_space=1,
|
||||
@@ -156,6 +157,7 @@ end
|
||||
function abad_shot_cacau ()
|
||||
if cacau:available(abad.cacau_num_shots, abad.cacau_type_shot) then
|
||||
sound.play(audio_abad_shot)
|
||||
abad.save_update=abad.update
|
||||
abad.update=abad_state_fire
|
||||
abad.wait=0
|
||||
-- cacau.init(abad.hab,abad.x+8,abad.y+8,abad.flip)
|
||||
@@ -346,8 +348,15 @@ function abad_state_fire()
|
||||
|
||||
if abad.wait==6 then
|
||||
abad.wait=0
|
||||
abad.update=abad_state_normal
|
||||
if abad.save_update==nil then
|
||||
abad.update=abad_state_normal
|
||||
else
|
||||
abad.update=abad.save_update
|
||||
abad.save_update=nil
|
||||
end
|
||||
end
|
||||
|
||||
if abad.save_update~=nil then abad_advance() end
|
||||
end
|
||||
|
||||
function abad_state_walking()
|
||||
@@ -419,6 +428,10 @@ function abad_state_jumping()
|
||||
abad.step=abad.step+1
|
||||
|
||||
if abad.jumpfwd then abad_advance() end
|
||||
|
||||
if abad.objects.llibre and controller:check("shoot") then
|
||||
abad_shot_cacau()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -456,6 +469,10 @@ function abad_state_falling()
|
||||
abad.jump_height = abad.jump_height-1
|
||||
abad.falling=abad.falling+1
|
||||
if abad.jumpfwd then abad_advance() end
|
||||
|
||||
if abad.objects.llibre and controller:check("shoot") then
|
||||
abad_shot_cacau()
|
||||
end
|
||||
end
|
||||
|
||||
function abad_state_stairs()
|
||||
|
||||
Reference in New Issue
Block a user