
function onCreate()
	-- background shit	
makeAnimatedLuaSprite('Parent Christmas Idle','manager',-640, 150)
addAnimationByPrefix('Parent Christmas Idle','dance','Parent Christmas Idle',24,true)

    addLuaSprite('Parent Christmas Idle', false);
        setProperty("skipCountdown", true)
end

function onBeatHit()

objectPlayAnimation('Parent Christmas Idle','dance',true)

end


function onUpdate(elapsed)
songPos = getSongPosition()
local currentBeat = (songPos/5000)*(curBpm/60)

--Player Notes

noteTweenY('defaultPlayerStrumY0', 4, defaultPlayerStrumY0 - 40*math.sin((currentBeat+4*0.25)*math.pi), 0.5)
noteTweenY('defaultPlayerStrumY1', 5, defaultPlayerStrumY1 - 40*math.sin((currentBeat+5*0.25)*math.pi), 0.5)
noteTweenY('defaultPlayerStrumY2', 6, defaultPlayerStrumY2 - 40*math.sin((currentBeat+6*0.25)*math.pi), 0.5)
noteTweenY('defaultPlayerStrumY3', 7, defaultPlayerStrumY3 - 40*math.sin((currentBeat+7*0.25)*math.pi), 0.5)
noteTweenX(defaultPlayerStrumX0, 4, defaultPlayerStrumX0 - 40*math.sin((currentBeat+4*0.25)*math.pi), 0.5)
noteTweenX(defaultPlayerStrumX1, 5, defaultPlayerStrumX1 - 40*math.sin((currentBeat+5*0.25)*math.pi), 0.5)
noteTweenX(defaultPlayerStrumX2, 6, defaultPlayerStrumX2 - 40*math.sin((currentBeat+6*0.25)*math.pi), 0.5)
noteTweenX(defaultPlayerStrumX3, 7, defaultPlayerStrumX3 - 40*math.sin((currentBeat+7*0.25)*math.pi), 0.5)
end

function opponentNoteHit()
health = getProperty('health')
    if getProperty('health') > 0.1 then
        setProperty('health', health- 0.01);
    end
  end