[NEW] Separats els fitxers de fase en 'normal', boss, maps
[NEW] Canviada la gestió de càrrega i execució de la fase de jefe [FIX] Musica parada a l'eixir del jefe
This commit is contained in:
+16
-9
@@ -41,7 +41,7 @@ function imp.new(_hab,_x,_y)
|
||||
pattern= pattern.new(),
|
||||
analisis = {}, -- memoria per a guardar el resultat de l'analisis
|
||||
step_length=1,
|
||||
energia=21,
|
||||
energia=1,
|
||||
max_energia=21,
|
||||
jump_height=0,
|
||||
max_jump_height=24,
|
||||
@@ -150,7 +150,7 @@ if DEBUG_FN_NAME then print_dbg("hit") end
|
||||
end
|
||||
end
|
||||
|
||||
if self.energia==1 then self.can_warp=true end
|
||||
if self.energia<=1 then self.can_warp=true end
|
||||
|
||||
if self.energia <= 0 then
|
||||
self.energia = 0
|
||||
@@ -176,6 +176,7 @@ end
|
||||
|
||||
|
||||
function imp:warp_update()
|
||||
print("warp_update")
|
||||
-- warp, wait, respawn
|
||||
if self.warping then
|
||||
if self.step<self.disappear_time then
|
||||
@@ -201,29 +202,35 @@ end
|
||||
|
||||
|
||||
function imp:update_disappearing()
|
||||
-- print_dbg(">>>>>>>>>> update_hit")
|
||||
print_dbg(">>>>>>>>>> update_disappearing "..self.wait)
|
||||
if not self.enabled then return end
|
||||
|
||||
-- Que pasa quan "mor"
|
||||
local step_time = self.disappear_time
|
||||
if self.can_warp then
|
||||
step_time = self.disappear_time/2; -- warp, wait
|
||||
end
|
||||
|
||||
self.wait=self.wait+1
|
||||
-- print(self.step)
|
||||
|
||||
if self.wait>=6 then
|
||||
self.wait=0
|
||||
-- self.step=self.step+1
|
||||
self:_step(self.step+1,"update_hit")
|
||||
self.step=self.step+1
|
||||
-- self:_step(self.step+1,"update_hit")
|
||||
|
||||
if self.can_warp then
|
||||
self:warp_update()
|
||||
self.moure = self.noop
|
||||
else
|
||||
self.enabled = false
|
||||
print("END BOSS")
|
||||
stages.stage1_boss_finished()
|
||||
if not self.warping then
|
||||
self.enabled = false
|
||||
print("END BOSS")
|
||||
-- stages.stage1_boss_finished()
|
||||
states:executar("stage1_boss_outro", true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function imp:update_normal()
|
||||
|
||||
Reference in New Issue
Block a user