[WIP] Lluita contra jefes. Eliminats actors de la zona de combat
This commit is contained in:
@@ -29,10 +29,13 @@ function zombie.new(_hab,_x,_y,_flip)
|
||||
angle=0,
|
||||
d_angle=15,
|
||||
dying=false,
|
||||
death_time=40}
|
||||
death_time=40,
|
||||
enabled=true,
|
||||
disable_reason=""}
|
||||
end
|
||||
|
||||
function zombie:draw()
|
||||
if not self.enabled then return end
|
||||
-- if self.frame>0 then draw.surf((self.frame&7)*16,(self.frame>>3)*16,16,16,self.x,self.y,16,16,self.flip) end
|
||||
-- if self.frame>0 then draw.surf((self.frame&7)*cw,(self.frame>>cxr2)*ch,cw,ch,self.x*o2aX,self.y*o2aX,cw,ch,self.flip) end
|
||||
if self.warping then
|
||||
@@ -46,6 +49,7 @@ function zombie:draw()
|
||||
end
|
||||
|
||||
function zombie:update_normal()
|
||||
if not self.enabled then return end
|
||||
self.wait=self.wait+1
|
||||
|
||||
if self.wait==18 then
|
||||
@@ -91,7 +95,8 @@ function zombie:update_normal()
|
||||
--end
|
||||
end
|
||||
|
||||
function zombie:update_hit()
|
||||
function zombie:update_hit()
|
||||
if not self.enabled then return end
|
||||
self.wait=self.wait+1
|
||||
|
||||
if self.wait>=6 then
|
||||
@@ -116,11 +121,10 @@ function zombie:update_hit()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
function zombie:hit()
|
||||
if not self.enabled then return end
|
||||
self.update=zombie.update_hit
|
||||
|
||||
if self.can_warp then self.warping=true end
|
||||
|
||||
Reference in New Issue
Block a user