Refactor mana regeneration to add flash effect callback

This commit is contained in:
PeaAshMeter 2026-02-08 06:28:24 +03:00
parent 163906c289
commit 78776ec0dd

View File

@ -99,8 +99,17 @@ function regenerateMana:cast(caster, target)
Tree.behaviors.positioned.new(caster:has(Tree.behaviors.positioned).position + Vec3 { 0.5, 0.5 }),
}
local flash = function(callback)
light:has(Tree.behaviors.light):animateColor(Vec3 {})(
function()
light:die()
callback()
end
)
end
return task.wait {
light:has(Tree.behaviors.light):animateColor(Vec3 {}),
flash,
sprite:animate("hurt")
}
end