Better testscene
This commit is contained in:
14
Assets/lua/heal_trigger.lua
Normal file
14
Assets/lua/heal_trigger.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
-- heal_trigger.lua - Heals player when entering the zone
|
||||
-- Attach to a PSXTriggerBox near a health pickup
|
||||
|
||||
function onTriggerEnter()
|
||||
Debug.Log("Entered heal zone")
|
||||
setStatus("Healing!")
|
||||
applyHeal(50)
|
||||
Audio.Play("heal", 100, 64)
|
||||
end
|
||||
|
||||
function onTriggerExit()
|
||||
Debug.Log("Left heal zone")
|
||||
setStatus("Left the healing area")
|
||||
end
|
||||
Reference in New Issue
Block a user