
function onCreate()
	-- background shit
	makeLuaSprite('lowhealth', 'lowhealth', 0, 0);
	addLuaSprite('lowhealth', true);
	setScrollFactor('lowhealth', 0, 0);
	doTweenAlpha('healthfadein', 'lowhealth', 0, 0, linear);
end

-- Gameplay/Song interactions
function onBeatHit()
	if curBeat % 2 == 0 and getProperty('health') < 0.5 then
		playSound("beep");
		doTweenAlpha('healthfade', 'lowhealth', 1, 0.5, linear);
	end

	if curBeat % 2 ~= 0 or getProperty('health') > 0.5 then
		doTweenAlpha('healthfadein', 'lowhealth', 0, 0.5, linear);
	end
end

function onUpdatePost(elapsed)
	-- end of "update"
end