
--// 9/11

function onCreate()
	precacheImage('tower/splat')
	setProperty('timeBar.visible', false)
	setProperty('timeBarBG.visible', false)
	setProperty('timeTxt.visible', false)
end

local stepFuncs = {
	--// splat
	[72] = function()
		setProperty('boyfriend.visible', false)

		makeAnimatedLuaSprite('background', 'tower/splat', -1100, -500)
		luaSpriteAddAnimationByPrefix('background', 'splat', 'splat', 14, false)
		addLuaSprite('background', false)
		objectPlayAnimation('background', 'splat', false)
		setProperty('background.angle', 20)
		doTweenAngle('backgroundangle', 'background', 0, 0.2, 'circOut')
		doTweenZoom('camz','camGame','sineInOut')

		setPropertyFromGroup('opponentStrums', 0, 'alpha', 0)
        setPropertyFromGroup('opponentStrums', 1, 'alpha', 0)
        setPropertyFromGroup('opponentStrums', 2, 'alpha', 0)
        setPropertyFromGroup('opponentStrums', 3, 'alpha', 0)
        setPropertyFromGroup('playerStrums', 0, 'alpha', 0)
        setPropertyFromGroup('playerStrums', 1, 'alpha', 0)
        setPropertyFromGroup('playerStrums', 2, 'alpha', 0)
        setPropertyFromGroup('playerStrums', 3, 'alpha', 0)
        setProperty('botplayTxt.visible', false)
        setProperty('scoreTxt.visible', false)
	end,

	[84] = function()
		doTweenZoom('camz','camGame',0.5,20,'sineIn')
	end,

	--// fade out
	[130] = function() --144
		makeLuaSprite('fade')
		makeGraphic('fade', 4000, 2000, '000000')
		setProperty('fade.alpha', 0)
		screenCenter('fade')
		addLuaSprite('fade', false)
		doTweenAlpha('blackout', 'fade', 1, 8, 'cubicIn')
	end,

	--// glory to america
	[216] = function()
		doTweenZoom('camz','camGame',1,0.1,'sineIn')
	end,
	
	[218] = function() --218
		makeLuaSprite('shootings', 'incidentcount', -560, 250)
		addLuaSprite('shootings', false)
		makeLuaSprite('deathrate', 'funfact', 250, 150)
		addLuaSprite('deathrate', false)
		makeLuaText('glory', "GOD BLESS THE USA", 400, 0, 0)
		setTextSize('glory', 80)
		setTextItalic('glory', true)
		screenCenter('glory')
		addLuaText('glory')
	end
}

function onStepHit()
	if stepFuncs[curStep] then
		stepFuncs[curStep]()
	end
end