- Astounded now blink correctly

- Caco smaller, can be crouched off
This commit is contained in:
2022-11-02 19:17:36 +01:00
parent e55d86cba8
commit 47172426ad
2 changed files with 5 additions and 5 deletions

View File

@@ -1,11 +1,11 @@
caco={}
function caco.new(_hab,_x,_y,_flip)
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}}
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=4,w=12,h=8}}
end
function caco:draw()
sspr((self.frame&7)*16,(self.frame>>3)*16,16,16,self.x,self.y,16,16,self.flip)
if self.frame>0 then sspr((self.frame&7)*16,(self.frame>>3)*16,16,16,self.x,self.y,16,16,self.flip) end
end
function caco:update_normal()
@@ -63,7 +63,7 @@ function caco:update_hit()
if self.step%2==0 then
self.frame=21
else
self.frame=7
self.frame=-1
end
elseif self.step>=40 then
self.frame=19