- New hurt system
This commit is contained in:
@@ -42,8 +42,7 @@ function fireball:update()
|
|||||||
if fireball.hab==abad.hab then
|
if fireball.hab==abad.hab then
|
||||||
if aabb(fireball,abad) and abad.update~=abad_state_crouch then
|
if aabb(fireball,abad) and abad.update~=abad_state_crouch then
|
||||||
fireball.hab=-1
|
fireball.hab=-1
|
||||||
if abad.energia>0 then abad.energia=abad.energia-1 end
|
abad_hurt(1)
|
||||||
cls(3)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -36,8 +36,7 @@ function zombie:update_normal()
|
|||||||
|
|
||||||
if self.hab==abad.hab then
|
if self.hab==abad.hab then
|
||||||
if aabb(abad,self) then
|
if aabb(abad,self) then
|
||||||
if abad.energia>0 then abad.energia=abad.energia-1 end
|
abad_hurt(1)
|
||||||
cls(3)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user