- Astounded now blink correctly
- Caco smaller, can be crouched off
This commit is contained in:
6
caco.lua
6
caco.lua
@@ -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
|
||||
|
||||
@@ -5,7 +5,7 @@ function zombie.new(_hab,_x,_y,_flip)
|
||||
end
|
||||
|
||||
function zombie: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 zombie:update_normal()
|
||||
@@ -56,7 +56,7 @@ function zombie:update_hit()
|
||||
if self.step%2==0 then
|
||||
self.frame=16
|
||||
else
|
||||
self.frame=7
|
||||
self.frame=-1
|
||||
end
|
||||
elseif self.step>=40 then
|
||||
self.step=0
|
||||
|
||||
Reference in New Issue
Block a user