local sw2sh=(360/SCREEN_HEIGHT)*SCREEN_WIDTH

local bt=60/127 --beattime, 60 seconds over 127 bpm



return Def.ActorFrame{

	OnCommand=function(self)

		self:sleep(9999)

	end,

	

	Def.Sprite{

		Name="omg",

		Texture="../_Graphics/omg 5x5.png",

	

		OnCommand=function(self)

			self:SetAllStateDelays(bt/9)

			:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y):zoomto(sw2sh,SCREEN_HEIGHT)

			:sleep(bt*2):queuecommand("GetFlippy") --25 of 25 frames, stop on last

		end, --OnCommand()

		

		GetFlippyCommand=function(self)

			self:SetAllStateDelays(573)

			:zoomto(0.8*sw2sh,0.8*SCREEN_HEIGHT):rotationy(180)

			:decelerate(bt/2):zoomto(sw2sh,SCREEN_HEIGHT):linear(0)

		
	
			:zoomto(0.8*sw2sh,0.8*SCREEN_HEIGHT):rotationy(0)

			:decelerate(bt/2):zoomto(sw2sh,SCREEN_HEIGHT):linear(0)

			
	
		:zoomto(0.8*sw2sh,0.8*SCREEN_HEIGHT):rotationy(180)

			:decelerate(bt/2*5/8):zoomto(sw2sh,SCREEN_HEIGHT):linear(0)

				

			:zoomto(0.8*sw2sh,0.8*SCREEN_HEIGHT):rotationy(0)

			:decelerate(bt/2):zoomto(sw2sh,SCREEN_HEIGHT):linear(0)

		
	
			:zoomto(0.8*sw2sh,0.8*SCREEN_HEIGHT):rotationy(180)

			:decelerate(bt/2*3/8):zoomto(sw2sh,SCREEN_HEIGHT):linear(0)

		
	
			:accelerate(bt/2):zoomto(0,0)

			:sleep(bt):queuecommand("Yamero")
	
	end, --GetFlippy()


		YameroCommand=function(self)

			local yame = self:GetParent():GetChild("yameAF")

			yame:queuecommand("Spin")

		end --Yamero()
	}, --Def.Sprite omg


	
Def.ActorFrame{

		Name="yameAF",

		InitCommand=function(self)

			self:xy(SCREEN_CENTER_X,SCREEN_CENTER_Y)

		end, --InitCommand()

		

		SpinCommand=function(self)

			self:spin():effectmagnitude(0,0,1080)

			self:GetChild("omgyame"):queuecommand("Zoom")

		end, --SpinCommand()

		

		Def.Sprite{

			Name="omgyame",

			Texture="../_Graphics/omgyame",

			InitCommand=function(self)

				self:zoomto(0,0)

			end, --InitCommand()

			

			ZoomCommand=function(self) --called by sprite omg

				self:decelerate(bt/2):zoomto(sw2sh*1.5,SCREEN_HEIGHT*1.2)

				:accelerate(bt/4):diffusealpha(0)

			end --Zoom()

		} --Sprite omgyame

	} --AF yameAF

}