Add file death_logic.lua
This commit is contained in:
parent
b73ab976a1
commit
3fe8d2d3c5
|
@ -159,6 +159,7 @@ dofile(api_path .. "movement.lua")
|
|||
dofile(api_path .. "set_up.lua")
|
||||
dofile(api_path .. "attack_type_instructions.lua")
|
||||
dofile(api_path .. "sound_handling.lua")
|
||||
dofile(api_path .. "death_logic.lua")
|
||||
|
||||
|
||||
mobs.spawning_mobs = {}
|
||||
|
|
|
@ -611,7 +611,7 @@ mobs.mob_step = function(self, dtime)
|
|||
end
|
||||
|
||||
if self.health <= 0 then
|
||||
print("I'm DEAD :(")
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -668,6 +668,8 @@ mobs.mob_step = function(self, dtime)
|
|||
if self.pause_timer < 0 then
|
||||
self.pause_timer = 0
|
||||
end
|
||||
|
||||
return -- don't allow collision detection
|
||||
--do normal ai
|
||||
else
|
||||
--jump only (like slimes)
|
||||
|
|
Loading…
Reference in New Issue