local jumpSound = nil

function OnInit()
    jumpSound = Engine.GetObjectByTag("Jump_Object_Sound")
    if not jumpSound then
        Engine.LogError("Jump_Object_Sound object not found!")
    end
end

function OnUpdate(dt)
    if Engine.KeyDown(Keycode.Space) and jumpSound then
        local sound = jumpSound:GetComponent("SoundComponent")
        if sound then
            sound:Play()
        end
    end
end
