mirror of
https://github.com/ElCeejo/creatura.git
synced 2025-03-15 12:21:24 +00:00
Merge pull request #7 from JordanL2/damage_texture_mod
Texture mod fix when indicating damage
This commit is contained in:
commit
23c61e0751
2 changed files with 6 additions and 4 deletions
5
api.lua
5
api.lua
|
@ -55,10 +55,11 @@ end
|
|||
---------------
|
||||
|
||||
local function indicate_damage(self)
|
||||
self.object:set_texture_mod("^[colorize:#FF000040")
|
||||
local texture_mod = self.object:get_texture_mod()
|
||||
self.object:set_texture_mod(texture_mod .. "^[colorize:#FF000040")
|
||||
core.after(0.2, function()
|
||||
if creatura.is_alive(self) then
|
||||
self.object:set_texture_mod("")
|
||||
self.object:set_texture_mod(texture_mod)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -203,10 +203,11 @@ local function index_box_border(self)
|
|||
end
|
||||
|
||||
local function indicate_damage(self)
|
||||
self.object:set_texture_mod("^[colorize:#FF000040")
|
||||
local texture_mod = self.object:get_texture_mod()
|
||||
self.object:set_texture_mod(texture_mod .. "^[colorize:#FF000040")
|
||||
core.after(0.2, function()
|
||||
if creatura.is_alive(self) then
|
||||
self.object:set_texture_mod("")
|
||||
self.object:set_texture_mod(texture_mod)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue