- final cutscenes finished
- fade system - minor changes to stairs graphic
This commit is contained in:
44
final.lua
44
final.lua
@@ -5,14 +5,17 @@ function final_init()
|
||||
cameras={}
|
||||
current_actor=1
|
||||
|
||||
--table.insert(actors,zombie.new(2,24,24,false))
|
||||
|
||||
abad.update = abad_nop
|
||||
_update=update_final
|
||||
next_actor()
|
||||
play(audio_final)
|
||||
local r,g,b=getcolor(15)
|
||||
setcolor(17,r,g,b)
|
||||
--fade.fadein()
|
||||
end
|
||||
|
||||
go_next_actor=false
|
||||
|
||||
function update_final()
|
||||
cls(16)
|
||||
|
||||
@@ -25,7 +28,7 @@ function update_final()
|
||||
rectfill(114,0,191,96,16)
|
||||
rect(15,40,113,89,2)
|
||||
|
||||
text("C A C A U S", 42, 12, 15)
|
||||
text("C A C A U S", 42, 12, 17)
|
||||
text(actor.name, 64-(#actor.name*2), 28, 11)
|
||||
|
||||
mapa_update(abad.hab,final_room)
|
||||
@@ -38,6 +41,8 @@ function update_final()
|
||||
play(audio_final)
|
||||
end
|
||||
end
|
||||
|
||||
if go_next_actor then next_actor() end
|
||||
end
|
||||
|
||||
function init_actor(name,flipped,w,h,anim)
|
||||
@@ -80,7 +85,9 @@ function draw_actor()
|
||||
end
|
||||
|
||||
if actor.x>96 or actor.x<-actor.w or (#actor.anim==1 and actor.center_count==0) then
|
||||
next_actor()
|
||||
go_next_actor=true
|
||||
fade.fadeoutin()
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -89,6 +96,8 @@ function draw_actor()
|
||||
end
|
||||
|
||||
function next_actor()
|
||||
go_next_actor=false
|
||||
faded = true
|
||||
if current_actor==1 then
|
||||
init_actor("ZOMBIE",false,16,16,{16,17,16,18})
|
||||
elseif current_actor==2 then
|
||||
@@ -117,11 +126,32 @@ function next_actor()
|
||||
init_actor("BATMAN",false,16,16,{24,25,24,26})
|
||||
elseif current_actor==13 then
|
||||
init_actor("EL ABAD",true,16,16,{0,1,0,2})
|
||||
elseif current_actor==14 then
|
||||
final_count=0
|
||||
_update=update_final2
|
||||
fade.fadeoutin()
|
||||
end
|
||||
final_room=final_rooms[current_actor]
|
||||
current_actor=current_actor+1
|
||||
end
|
||||
|
||||
---bol de cacaus
|
||||
--batman
|
||||
--abad
|
||||
function update_final2()
|
||||
cls(16)
|
||||
|
||||
text("C A C A U S", 42, 12, 17)
|
||||
text("GRACIES PER JUGAR", 30, 48, 10)
|
||||
|
||||
if btnp(KEY_M) then
|
||||
mute = not mute
|
||||
if mute then
|
||||
stopchirp()
|
||||
else
|
||||
play(audio_final)
|
||||
end
|
||||
end
|
||||
final_count=final_count+1
|
||||
if final_count==200 or btnp(KEY_SPACE) or btnp(KEY_RETURN) then
|
||||
game_init(true)
|
||||
fade.fadeoutin()
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user