[FIX] Eliminat rectangle bb del peu
[NEW] Final temporal del joc. Ja es completament jugable
This commit is contained in:
+1
-1
@@ -37,7 +37,7 @@ function peu.draw()
|
|||||||
draw.surf(x,y,peu.w,peu.h,scr_x,scr_y,peu.w,peu.h)
|
draw.surf(x,y,peu.w,peu.h,scr_x,scr_y,peu.w,peu.h)
|
||||||
|
|
||||||
-- bb debug
|
-- bb debug
|
||||||
draw.rect(scr_x+peu.bb.x,scr_y+peu.bb.y,peu.bb.w,peu.bb.h,3)
|
-- draw.rect(scr_x+peu.bb.x,scr_y+peu.bb.y,peu.bb.w,peu.bb.h,3)
|
||||||
end
|
end
|
||||||
|
|
||||||
function peu.update()
|
function peu.update()
|
||||||
|
|||||||
+23
-8
@@ -3,10 +3,13 @@ stage1_ending ={
|
|||||||
batvio_vx = 1,
|
batvio_vx = 1,
|
||||||
update = function(self)
|
update = function(self)
|
||||||
stage1_ending:update_scene()
|
stage1_ending:update_scene()
|
||||||
|
end,
|
||||||
|
ended = function(self)
|
||||||
|
stage1_ending:end_scene()
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
function stage1_ending.update_scene(self)
|
function stage1_ending:update_scene()
|
||||||
-- print("UPDATING "..self.time)
|
-- print("UPDATING "..self.time)
|
||||||
|
|
||||||
if self.time==0 then
|
if self.time==0 then
|
||||||
@@ -55,7 +58,10 @@ function stage1_ending.update_scene(self)
|
|||||||
elseif self.time==720 then
|
elseif self.time==720 then
|
||||||
start_scene(scenes.stage1_ending_3, nil, false)
|
start_scene(scenes.stage1_ending_3, nil, false)
|
||||||
elseif self.time==721 then
|
elseif self.time==721 then
|
||||||
|
-- Acabar ending
|
||||||
fade.fadeoutin()
|
fade.fadeoutin()
|
||||||
|
self.time = 0
|
||||||
|
states:next()
|
||||||
end
|
end
|
||||||
|
|
||||||
surf.target(0)
|
surf.target(0)
|
||||||
@@ -78,17 +84,26 @@ function stage1_ending.update_scene(self)
|
|||||||
self.time = self.time + 1
|
self.time = self.time + 1
|
||||||
|
|
||||||
-- Acabar ending
|
-- Acabar ending
|
||||||
if self.time>=800 then
|
-- if self.time>=750 then
|
||||||
states:next()
|
-- self.time = 0
|
||||||
end
|
-- states:next()
|
||||||
|
-- end
|
||||||
end
|
end
|
||||||
|
|
||||||
function stage1_ending.end_scene()
|
function stage1_ending:end_scene()
|
||||||
print("END")
|
-- print("END")
|
||||||
states:finish()
|
surf.target(0)
|
||||||
|
surf.cls(16)
|
||||||
|
font.current(font_sf)
|
||||||
|
draw.text("Gracies per jugar!",20,100,2)
|
||||||
|
self.time = self.time + 1
|
||||||
|
if self.time == 200 then
|
||||||
|
-- states:finish()
|
||||||
|
states:executar("title",false)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
states:registrar("stage1_ending",{
|
states:registrar("stage1_ending",{
|
||||||
stage1_ending.update,
|
stage1_ending.update,
|
||||||
stage1_ending.end_scene
|
stage1_ending.ended
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user