[WIP] Treballant en el jefe. Per fi torna a ser jugable! Ara a pels detalls

This commit is contained in:
2026-04-18 18:45:58 +02:00
parent 8f65666a06
commit dab08a0f17
18 changed files with 144 additions and 2577 deletions

View File

@@ -560,7 +560,8 @@ if DEBUG_FN_NAME then print_dbg("") end
-- Inicialització de fer el salt
jumpfwd = jumpfwd or false
self.jump_height = 0
self.step=0
-- self.step=0
self:_step(0,"jump")
self.jumpfwd=jumpfwd
self.moure = imp.state_jumping
end
@@ -568,7 +569,6 @@ end
function imp:state_jumping()
if self.mood==self.moods.stop then return self.mood end
if DEBUG_FN_NAME then print_dbg("state_jumping") end
-- print_dbg(">>>>>>>>>> state_jumping")
-- ??
self.wait=self.wait+1
self.wait=0
@@ -581,7 +581,8 @@ if DEBUG_FN_NAME then print_dbg("state_jumping") end
-- Canviar a mode caure
self.moure = imp.state_falling
end
self.step=self.step+1
-- self.step=self.step+1
self:_step(self.step+1,"state_jumping")
-- cap endavant?
if self.jumpfwd then self:advance() end
@@ -680,7 +681,6 @@ end
function imp:state_falling()
if DEBUG_FN_NAME then print_dbg("state_falling") end
-- print_dbg(">>>>>>>>>> state_falling")
-- self.frame=30
self.wait=self.wait+1
self.next_frame=imp.falling_next_frame
@@ -731,7 +731,6 @@ end
function imp:state_walking()
if self.mood==self.moods.stop then return end
if DEBUG_FN_NAME then print("state_walking") end
-- print_dbg(">>>>>>>>>> state_walking")
-- Limitar la velocitat de moviment
self.wait=self.wait+1
@@ -756,10 +755,10 @@ end
function imp:state_normal()
if DEBUG_FN_NAME then print_dbg("state_normal") end
-- print_dbg(">>>>>>>>>> state_normal")
self.frame=28
self.wait=0
self.step=0
-- self.step=0
self:_step(0,"state_normal")
self.jumpfwd=false
self.jump_height = 0
self.next_frame=imp.staying_next_frame
@@ -770,7 +769,8 @@ function imp:walking_next_frame()
-- Selecció de frame
if self.wait>=6 then
self.wait=0
self.step=(self.step+1)%4
-- self.step=(self.step+1)%4
self:_step((self.step+1)%4,"walking_next_frame")
self.frame=self.anim[self.step+1]
end