- fixed initial frame, new abad hurting system
This commit is contained in:
5
caco.lua
5
caco.lua
@@ -1,7 +1,7 @@
|
||||
caco={}
|
||||
|
||||
function caco.new(_hab,_x,_y,_flip)
|
||||
return {hab=_hab,x=_x,y=_y,flip=_flip,frame=0,wait=0,step=0,hit=caco.hit,update=caco.update_normal,draw=caco.draw,jumpfwd=false,anim={19,19,20,21},bb={x=2,y=0,w=12,h=16}}
|
||||
return {hab=_hab,x=_x,y=_y,flip=_flip,frame=19,wait=0,step=0,hit=caco.hit,update=caco.update_normal,draw=caco.draw,jumpfwd=false,anim={19,19,20,21},bb={x=2,y=0,w=12,h=16}}
|
||||
end
|
||||
|
||||
function caco:draw()
|
||||
@@ -43,8 +43,7 @@ function caco:update_normal()
|
||||
|
||||
if self.hab==abad.hab then
|
||||
if aabb(abad,self) then
|
||||
if abad.energia>0 then abad.energia=abad.energia-1 end
|
||||
cls(3)
|
||||
abad_hurt(1)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user