
var areyousureBG = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 79,
			scaleX: 500,
			scaleY: 250,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "tiles",
			name: "black",
			defaultAnimationName: "default",
			loop: false,
			alpha: 0.7,
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			allowRotation: true,
			isSensor: true,
			dynamicFriction: 0,
			density: 0.000000000001,
		}
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 500,
			height: 250,
		}
	},
]};

var areyousureYesButton = { tag: "yes", components: [
	{
		c: TransformComponent,
		d: {
			x: 100,
			y: 90,
			zIndex: 80,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			align: TextAlign.center,
			spacing: 2,
			spaceWidth: 10,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 2 / 4,
				tint: 0xffffff,
			}
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			allowRotation: true,
			isSensor: true,
			dynamicFriction: 0,
			density: 0.000000000001,
		}
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 200,
			height: 45,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 0.15,
			component: "TransformComponent",
			field: "simpleLocalScale",
			values: [1.2, 1],
			easing: EasingFunctions.easeInOut
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			align: TextAlign.center,
			spacing: -3,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 1 / 2,
				alpha: 1,
			}
		}
	},
	{
		c: ClickableComponent,
		d: {
			animateOnHover:true,
		}
	},
]};

var areyousureNoButton = { extend: areyousureYesButton, tag: "no", components: [
	{
		c: TransformComponent,
		d: {
			x: -100,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
		}
	},
]};

var areyousureText = { tag: "textfield", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -90,
			zIndex: 81,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			align: TextAlign.center,
			spacing: 0,
			spaceWidth: 10,
			lineHeight: -70,
			textWrapping: 350,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 0.70,
				tint: 0xffffff,
			}
		}
	},
]};

var areyousureTextSmall = { tag: "textfieldSmall", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 81,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			align: TextAlign.center,
			spacing: 2,
			spaceWidth: 10,
			lineHeight: -35,
			textWrapping: 350,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 4,
				tint: 0xffffff,
			}
		}
	},
]};

var areyousure = { components: [
	{
		c: TransformComponent,
		d: {
			x: 720,
			y: 450,
			zIndex: 80
		}
	},
], children: [
	areyousureYesButton,
	areyousureNoButton,
	areyousureText,
	areyousureTextSmall,
	areyousureBG
]};

var objectiveOverlayHeader = { components: [
	{
		c: TransformComponent,
		d: {
			x: 600,
			y: 100,
			zIndex: 2
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$objectives",
			align: TextAlign.right,
			spacing: 2,
			spaceWidth: 10,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 3 / 4,
				tint: 0xffffff,
			}
		}
	},
]};

/**
 * The text that explains an objective in esc menu and overlay during level.
 */
var objectiveOverlay = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 2
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			align: TextAlign.right,
			spacing: 0,
			spaceWidth: 6,
			lineHeight: -30,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 11 / 20,
				tint: 0xe2b47f,
			}
		}
	},
]};

var intelOverlayHeader = { extend: objectiveOverlayHeader, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$intel",
		}
	},
]};

var intelOverlay = { extend: objectiveOverlay, components: [
	{
		c: PixelTextComponent,
		d: {
			fontDefinition: {
				tint: 0xaeaeae,
			}
		}
	},
]};

var loading = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 100,
			scaleX: 1,
			scaleY: 1,
			zIndex: 100
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$loading",
			align: TextAlign.right,
			spacing: -3,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 2 / 3,
				tint: 0xe0b86c
			}
		}
	},
]};

var ready = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 100,
			scaleX: 1,
			scaleY: 1,
			zIndex: 10
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			duration: 0.7,
			values: [1.0, 0.9, 0.0, 0.9, 1.0],
			repeat: true,
			useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$clickContinue",
			align: TextAlign.right,
			spacing: -3,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 2 / 3,
				tint: 0xe0b86c
			}
		}
	},
	{
		c: ClickableComponent,
	},
	{
		c: ColliderComponent,
		d: {
			width: 3000,
			height: 3000,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
		}
	}
]};


var masterplanOverlayLogo = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			scaleX: 1,
			scaleY: 1,
			zIndex: 100
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 2,
			values: [0.0, 1.0, 1.0 ,1.0, 0.0],
			useUnadjustedFrameTime: false,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_title",
			name: "title",
			alpha: 0,
			defaultAnimationName: "default",
		}
	}
]};

var howToPlay = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "howToPlay",
			name: "howtoplay",
			//#if tablet
			//scale: 2
			//#else
			scale: 1
			//#end
		}
	},
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 40,
		}
	},
]};

var levelInfo = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "levelInfo",
			name: "levelInfo",
			//#if tablet
			//scale: 2
			//#else
			scale: 1
			//#end
		}
	},
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 40,
		}
	},
]};

var titleMenuItemBase = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 60,
			scaleX: 1,
			scaleY: 1,
			zIndex: -5
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			allowRotation: true,
			isSensor: true,
			dynamicFriction: 0,
			density: 0.000000000001,
		}
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 300,
			height: 45,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 0.15,
			component: "TransformComponent",
			field: "simpleLocalScale",
			values: [1.2, 1],
			easing: EasingFunctions.easeInOut
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$newGame",
			align: TextAlign.center,
			spacing: -3,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 1 / 2,
				alpha: 1,
			}
		}
	},
	{
		c: ClickableComponent,
		d: {
			animateOnHover:true,
		}
	},
]};

var titleMenuExit = { tag: "titleMenuExit", extend: titleMenuItemBase, components: [
	{
		c: TransformComponent,
		d: {
			y: 370,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$quit",
		}
	},
]};

var titleMenuBonusDescription = { components: [
		{
		c: TransformComponent,
		d: {
			x: 0,
			y: 30,
			scaleX: 1,
			scaleY: 1,
			zIndex: -5
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$ludumDare",
			align: TextAlign.center,
			spaceWidth: 5,
			spacing: -2,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 1 / 5,
				alpha: 1,
				tint: 0xe0b86c
			}
		}
	},
]};

var titleMenuBonus = { tag: "titleMenuBonus", extend: titleMenuItemBase, components: [
	{
		c: TransformComponent,
		d: {
			y: 310,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$bonusGame",
		}
	},
], children: [
	titleMenuBonusDescription,
]};

var titleMenuContinue = { tag: "titleMenuContinue", extend: titleMenuItemBase, components: [
	{
		c: TransformComponent,
		d: {
			y: 150,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$continue",
		}
	},
]};

var titleMenuNew = { tag: "titleMenuNew", extend: titleMenuItemBase, components: [
	{
		c: TransformComponent,
		d: {
			y: 200,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$newGame",
		}
	},
]};

var titleMenuLoad = { tag: "titleMenuLoad", extend: titleMenuItemBase, components: [
	{
		c: TransformComponent,
		d: {
			y: 250,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$loadGame",
		}
	},
]};

var loadGameName = { tag:"loadGameName", components:[
	{
		c: TransformComponent,
		d: {
			x: -150,
			y: -3,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$name",
			align: TextAlign.left,
			spaceWidth: 5,
			spacing: -1,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontTypewriter",
				scale: 3 / 5,
				alpha: 1,
				tint: 0x101010
			}
		}
	},
]};

var loadGameElementBG = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			scaleX: 1.2,
			scaleY: 0.6,
			zIndex: -1
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "cornerCard",
			tint: 0xe1cb48,
			loop: true,
			alpha: 1,
		}
	},
]};

var titleMenuLoadGameElement = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 10
		}
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 320,
			height: 75,
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
			isKinematic:true,
		}
	},
	{
		c: ClickableComponent,
		d: {
			animateOnHover:true,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 0.15,
			component: "TransformComponent",
			field: "simpleLocalScale",
			values: [1.2, 1],
			easing: EasingFunctions.easeInOut
		}
	},
], children:[
	loadGameName,
	loadGameElementBG
]};


var loadGameDetailsLoot = { tag:"loadGameDetailsLoot", components:[
	{
		c: TransformComponent,
		d: {
			x: 180,
			y: -130,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$",
			align: TextAlign.right,
			spaceWidth: 5,
			spacing: -2,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
			//	sheet: "ui_fontGreasyStroke",
				sheet: "ui_fonts",	
				scale: 1,
				alpha: 1,
				tint: 0x101010
			//	tint: 0xffffff
			}
		}
	},
]};

var loadGameDetailsDate = { tag:"loadGameDetailsDate", components:[
	{
		c: TransformComponent,
		d: {
			x: 180,
			y: -90,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			align: TextAlign.right,
			spaceWidth: 5,
			spacing: -1,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
			//	sheet: "ui_fontGreasyStroke",
				sheet: "ui_fonts",	
				scale: 2 / 5,
				alpha: 1,
				tint: 0x101010
			//	tint: 0xffffff
			}
		}
	},
]};

var loadGameDetailsLatest = { components:[
	{
		c: TransformComponent,
		d: {
			x: 180,
			y: -10,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$latest",
			align: TextAlign.right,
			spaceWidth: 5,
			spacing: -1,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
			//	sheet: "ui_fontGreasyStroke",
				sheet: "ui_fonts",	
				scale: 2 / 5,
				alpha: 1,
				tint: 0x101010
			//	tint: 0xffffff
			}
		}
	},
]};

var detailsGoonName = { tag: "goonName", components: [
	{
		c: TransformComponent,
		d: {
			x: 40,
			y: 0,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			align: TextAlign.left,
			spaceWidth: 5,
			spacing: -1,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
			//	sheet: "ui_fontGreasyStroke",
				sheet: "ui_fonts",	
				scale: 2 / 4,
				alpha: 1,
				tint: 0x101010
			//	tint: 0xffffff
			}
		}
	},
]};

var detailsGoonMugshot = { tag: "goonMugShot", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			scaleX: 0.5,
			scaleY: 0.5,
			zIndex: 8,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_screen-dimm",
			name: "screen-vignette",
		}
	},
]};

var loadGameDetailsGoon = { components: [
	{
		c: TransformComponent,
		d: {
			x: -140,
			y: 0,
		}
	}
], children: [
	detailsGoonName,
	detailsGoonMugshot
]};

var screenAnchor = { components: [
	{
		c: TransformComponent,
	}
]};

var loadGameDetailsLatestPhoto = { tag:"loadGameDetailsLatest", components:[
	{
		c: TransformComponent,
		d: {
			x: 180,
			y: -10,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_screen-dimm",
			name: "screen-vignette",
		}
	},
]};

var titleMenuLoadGameDetailsBG = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			scaleX: 1.3,
			scaleY: 0.8,
			zIndex: -5,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_memo",
			name: "memo",
			defaultAnimationName: "shoddy",
	//		tint: 0xcfcd81,
			tint: 0xccb52b,
			loop: true,
			alpha: 1,
		}
	},
]};

var titleMenuLoadGameDetails = { components: [
{
		c: TransformComponent,
		d: {
			x: 180,
			y: 150,
			zIndex: 10
		}
	}
], children:[
	loadGameDetailsDate,
	loadGameDetailsLoot,
	titleMenuLoadGameDetailsBG,
	//TODO: Implement the loadGameDetailsLatestPhoto .sheet & .name in SplashScene.hx
	//loadGameDetailsLatestPhoto
	//loadGameDetailsLatest,
]};

var titleMenuLoadGameAccept = { components: [
	{
		c: TransformComponent,
		d: {
			x: 300,
			y: 265,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$load",
			align: TextAlign.center,
			spaceWidth: 5,
			spacing: -2,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 1,
				alpha: 1,
				tint: 0xffffff
			}
		}
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 130,
			height: 60,
			offsetX: 0,
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
			isKinematic:true,
		}
	},
	{
		c: ClickableComponent,
		d: {
			animateOnHover:true,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 0.15,
			component: "TransformComponent",
			field: "simpleLocalScale",
			values: [1.1, 1],
			easing: EasingFunctions.easeInOut
		}
	},
]};


var titleMenuLoadGameBack = { components: [
	{
		c: TransformComponent,
		d: {
			x: -450,
			y: 280,
			zIndex: 15,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$back",
			align: TextAlign.center,
			spaceWidth: 5,
			spacing: -2,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 1 / 2,
				alpha: 1,
				tint: 0xffffff
			}
		}
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 75,
			height: 40,
			offsetX: 0,
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
			isKinematic:true,
		}
	},
	{
		c: ClickableComponent,
		d: {
			animateOnHover:true,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 0.15,
			component: "TransformComponent",
			field: "simpleLocalScale",
			values: [1.2, 1],
			easing: EasingFunctions.easeInOut
		}
	},
]};

var titleMenuLoadGameList = { components: [
	{
		c: TransformComponent,
		d: {
			x: -200,
			y: 150,
			zIndex: 10
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
			isKinematic:true,
		}
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 700,
			height: 300,
		}
	},
	{
		c: ScrollViewParentComponent,
		d: {
			isActive: true,
		}
	},
	{
		c: ClickableComponent,
	},
]};

var titleMenuLoadGameBG = { components: [
	{
		c: TransformComponent,
		d: {
			x: -200,
			y: 150,
			scaleX: 1.5,
			scaleY: 2,
			zIndex: 7
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_screen-dimm",
			name: "screen-vignette",
			loop: true,
			alpha: 0.2,
		}
	},
]};

var titleVersion = { components: [
	{
		c: TransformComponent,
		d: {
			x: 20,
			y: -20,
			scaleX: 1,
			scaleY: 1,
			zIndex: 20
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "The Masterplan 1.0.4",
			align: TextAlign.left,
			spacing: -1,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 2 / 7,
				tint: 0xe0b86c
			}
		}
	},
	{
		c: ClickableComponent,
	},
]};

var titleBG1Sprite = { components: [
	{
		c: TransformComponent,
		d: {
			x: 300,
			y: 0,
		}
	},
/*
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_title",
			name: "bg1",
			alpha: 0,
			//#if tablet
			//scale: 2
			//#else
			scale: 1
			//#end
		}
	},
*/
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "SpriteComponent",
			field: "alpha",
			duration: 7,
			values: [0,1,0],
			easing: EasingFunctions.linear,
			repeat: true
		}
	},
]};

var titleBG2Sprite = { components: [
	{
		c: TransformComponent,
		d: {
			x: -300,
			y: 0,
		}
	},
/*
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_title",
			name: "bg2",
			alpha: 0,
			//#if tablet
			//scale: 2
			//#else
			scale: 1
			//#end
		}
	},
*/
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "SpriteComponent",
			field: "alpha",
			duration: 9,
			values: [0,1,0],
			easing: EasingFunctions.linear,
			repeat: true
		}
	},
]};

var titleBG1 = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 7,
			values: [{ x: 0, y: -200.0 }, { x: 0, y: 0 }, { x: 0, y: 200.0 }],
			easing: EasingFunctions.linear,
			repeat: true
		}
	},
], children: [
	titleBG1Sprite
]};

var titleBG2 = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 9,
			values: [{ x: 0, y: 200.0 }, { x: 0, y: 0 }, { x: 0, y: -200.0 }],
			easing: EasingFunctions.linear,
			repeat: true
		}
	},
], children: [
	titleBG2Sprite
]};

var titleIllustration = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			scaleX: 1,
			scaleY: 1,
			zIndex: -10
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_title_illu",
			name: "titleScreen",
			alpha: 0,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "SpriteComponent",
			field: "alpha",
			duration: 2,
			values: [0, 1],
			easing: EasingFunctions.linear,
			repeat: false
		}
	},
]};

var titleItCame = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -200,
			zIndex: 10
		}
	},
	/*
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_title",
			name: "itCameTitle",
			//#if tablet
			//scale: 2
			//#else
			scale: 1
			//#end
		}
	},
	*/
]};

var multiplayerControls = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 50,
			zIndex: 10
		}
	},
/*	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_title",
			name: "multiplayerControls",
			//#if tablet
			//scale: 2
			//#else
			scale: 1
			//#end
		}
	},
*/
]};

var titleScreen = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 10
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
			easing: EasingFunctions.easeOut,
		}
	},
], children: [
	titleIllustration
]};

var multiplayerStartScreen = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 10
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
			easing: EasingFunctions.easeOut,
		}
	},
], children: [
	titleItCame,
	multiplayerControls,
	titleBG1,
	titleBG2,
	{ components: [
		{
			c: TransformComponent,
			d: {
				x: -20,
				y: 225,
				scaleX: 1,
				scaleY: 1,
				zIndex: 10
			}
		},
		{
			c: PixelTextComponent,
			d: {
				text: "Players:",
				align: TextAlign.right,
				spacing: -3,
				fontDefinition: {
					layer: LayerDefinitions.LAYER_UI,
					sheet: "ui_fontGreasyStroke",
					scale: 1 / 2,
					tint: 0xdddddd
				}
			}
		},
	]},
	{ tag: "playerCount", components: [
		{
			c: TransformComponent,
			d: {
				x: 20,
				y: 225,
				scaleX: 1,
				scaleY: 1,
				zIndex: 10
			}
		},
		{
			c: PixelTextComponent,
			d: {
				text: "1",
				align: TextAlign.left,
				spacing: -3,
				fontDefinition: {
					layer: LayerDefinitions.LAYER_UI,
					sheet: "ui_fontGreasyStroke",
					scale: 1 / 2,
					tint: 0xe0b86c,
					alpha: 0.5,
				}
			}
		},
		{
			c: RigidBodyComponent,
			d: {
				layer: LayerDefinitions.LAYER_UI,
				allowRotation: true,
				isSensor: true,
				dynamicFriction: 0,
				density: 0.000000000001,
			}
		},
		{
			c: ClickableComponent,
		},
		{
			c: ColliderComponent,
			d: {
				collisionGroup: CollisionCategoryDefinitions.CC_UI,
				senses: [CollisionCategoryDefinitions.CC_MOUSE],
				width: 40,
				height: 75,
			}
		},
	]},
	{ tag: "playerCount", components: [
		{
			c: TransformComponent,
			d: {
				x: 60,
				y: 225,
				scaleX: 1,
				scaleY: 1,
				zIndex: 10
			}
		},
		{
			c: PixelTextComponent,
			d: {
				text: "2",
				align: TextAlign.left,
				spacing: -3,
				fontDefinition: {
					layer: LayerDefinitions.LAYER_UI,
					sheet: "ui_fontGreasyStroke",
					scale: 1 / 2,
					tint: 0xe0b86c,
					alpha: 1,
				}
			}
		},
		{
			c: RigidBodyComponent,
			d: {
				layer: LayerDefinitions.LAYER_UI,
				allowRotation: true,
				isSensor: true,
				dynamicFriction: 0,
				density: 0.000000000001,
			}
		},
		{
			c: ClickableComponent,
		},
		{
			c: ColliderComponent,
			d: {
				collisionGroup: CollisionCategoryDefinitions.CC_UI,
				senses: [CollisionCategoryDefinitions.CC_MOUSE],
				width: 40,
				height: 75,
			}
		},
	]},
	{ tag: "playerCount", components: [
		{
			c: TransformComponent,
			d: {
				x: 100,
				y: 225,
				scaleX: 1,
				scaleY: 1,
				zIndex: 10
			}
		},
		{
			c: PixelTextComponent,
			d: {
				text: "3",
				align: TextAlign.left,
				spacing: -3,
				fontDefinition: {
					layer: LayerDefinitions.LAYER_UI,
					sheet: "ui_fontGreasyStroke",
					scale: 1 / 2,
					tint: 0xe0b86c,
					alpha: 0.5,
				}
			}
		},
		{
			c: RigidBodyComponent,
			d: {
				layer: LayerDefinitions.LAYER_UI,
				allowRotation: true,
				isSensor: true,
				dynamicFriction: 0,
				density: 0.000000000001,
			}
		},
		{
			c: ClickableComponent,
		},
		{
			c: ColliderComponent,
			d: {
				collisionGroup: CollisionCategoryDefinitions.CC_UI,
				senses: [CollisionCategoryDefinitions.CC_MOUSE],
				width: 40,
				height: 75,
			}
		},
	]},
	{ tag: "playerCount", components: [
		{
			c: TransformComponent,
			d: {
				x: 140,
				y: 225,
				scaleX: 1,
				scaleY: 1,
				zIndex: 10
			}
		},
		{
			c: PixelTextComponent,
			d: {
				text: "4",
				align: TextAlign.left,
				spacing: -3,
				fontDefinition: {
					layer: LayerDefinitions.LAYER_UI,
					sheet: "ui_fontGreasyStroke",
					scale: 1 / 2,
					tint: 0xe0b86c,
					alpha: 0.5,
				}
			}
		},
		{
			c: RigidBodyComponent,
			d: {
				layer: LayerDefinitions.LAYER_UI,
				allowRotation: true,
				isSensor: true,
				dynamicFriction: 0,
				density: 0.000000000001,
			}
		},
		{
			c: ClickableComponent,
		},
		{
			c: ColliderComponent,
			d: {
				collisionGroup: CollisionCategoryDefinitions.CC_UI,
				senses: [CollisionCategoryDefinitions.CC_MOUSE],
				width: 40,
				height: 75,
			}
		},
	]},
	{ tag: "startCoop", components: [
		{
			c: TransformComponent,
			d: {
				x: 0,
				y: 300,
				scaleX: 1,
				scaleY: 1,
				zIndex: 10
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "PixelTextComponent",
				field: "alpha",
				duration: 0.7,
				values: [1.0, 0.9, 0.0, 0.9, 1.0],
				repeat: true
			}
		},
		{
			c: PixelTextComponent,
			d: {
				text: "$fromVault",
				align: TextAlign.center,
				spacing: -3,
				fontDefinition: {
					layer: LayerDefinitions.LAYER_UI,
					sheet: "ui_fontGreasyStroke",
					scale: 1 / 2,
					tint: 0xe0b86c
				}
			}
		},
		{
			c: RigidBodyComponent,
			d: {
				layer: LayerDefinitions.LAYER_UI,
				allowRotation: true,
				isSensor: true,
				dynamicFriction: 0,
				density: 0.000000000001,
			}
		},
		{
			c: ClickableComponent,
		},
		{
			c: ColliderComponent,
			d: {
				collisionGroup: CollisionCategoryDefinitions.CC_UI,
				senses: [CollisionCategoryDefinitions.CC_MOUSE],
				width: 400,
				height: 50,
			}
		},
	]},
	{ tag: "startDeathmatch", components: [
		{
			c: TransformComponent,
			d: {
				x: 0,
				y: 350,
				scaleX: 1,
				scaleY: 1,
				zIndex: 10
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "PixelTextComponent",
				field: "alpha",
				duration: 0.7,
				values: [0.0, 0.9, 1.0, 0.9, 0.0],
				repeat: true
			}
		},
		{
			c: PixelTextComponent,
			d: {
				text: "$deathmatch",
				align: TextAlign.center,
				spacing: -3,
				fontDefinition: {
					layer: LayerDefinitions.LAYER_UI,
					sheet: "ui_fontGreasyStroke",
					scale: 1 / 2,
					tint: 0xe0b86c
				}
			}
		},
		{
				c: RigidBodyComponent,
				d: {
					layer: LayerDefinitions.LAYER_UI,
					allowRotation: true,
					isSensor: true,
					dynamicFriction: 0,
					density: 0.000000000001,
				}
			},
			{
				c: ClickableComponent,
			},
			{
				c: ColliderComponent,
				d: {
					collisionGroup: CollisionCategoryDefinitions.CC_UI,
					senses: [CollisionCategoryDefinitions.CC_MOUSE],
					width: 400,
					height: 50,
				}
			},
	]},
]};

var levelTitleBaseObjectiveTitle = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -2/4,
			scaleX: 1,
			scaleY: 1,
			zIndex: 4
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$objective",
			align: TextAlign.left,
			spacing: -2,
			spaceWidth: 9,
			lineHeight: 70,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fontGreasyStroke",
				scale: 2 / 3,
			//	tint: 0xe0b86c,
				alpha: 1
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			duration: 1,
			values: [0, 0, 1],
			repeat: false,
		}
	},
]};

var levelTitleBaseObjectiveText = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -4/5,
			scaleX: 1,
			scaleY: 1,
			zIndex: 4
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "-Find your buddy\n-Steal the van",
			align: TextAlign.left,
			spacing: -2,
			spaceWidth: 9,
			lineHeight: 70,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fontGreasyStroke",
				scale: 1 / 3,
				tint: 0xe0b86c,
				alpha: 1
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			duration: 1,
			values: [0, 0, 0, 1],
			repeat: false,
		}
	},
]};

var levelTitleBaseObjectiveSkipToMap = { tag: "skipToMap", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -7/5,
			scaleX: 1,
			scaleY: 1,
			zIndex: 4
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "-Or click HERE to skip tutorial",
			align: TextAlign.left,
			spacing: -2,
			spaceWidth: 9,
			lineHeight: 70,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fontGreasyStroke",
				scale: 1 / 3,
				tint: 0xe0b86c,
				alpha: 1
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			duration: 1,
			values: [0, 0, 0, 1],
			repeat: false,
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			allowRotation: false,
			isKinematic: false,
			isSensor: true,
			dynamicFriction: 0,
			density: 0.000000000001,
		}
	},
	{
		c: ClickableComponent,
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 2,
			height: 1/5,
			offsetX: 1,
			offsetY: 0,
		}
	},
]};

var tutorialSkipTutorial = { tag: "skipToMap", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			scaleX: 1,
			scaleY: 1,
			zIndex: 4
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Skip tutorial",
			align: TextAlign.center,
			spacing: -2,
			spaceWidth: 9,
			lineHeight: 70,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fontGreasyStroke",
				scale: 1 / 3,
			//	tint: 0xe0b86c,
				alpha: 1
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			duration: 2,
			values: [0, 0, 0, 1],
			repeat: false,
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			allowRotation: false,
			isKinematic: false,
			isSensor: true,
			dynamicFriction: 0,
			density: 0.000000000001,
		}
	},
	{
		c: ClickableComponent,
	},
	{
		c: ColliderComponent,
		d: {
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
			width: 2/3,
			height: 1/5,
			offsetX: 0,
			offsetY: 0,
		}
	},
]};

var levelTitleBase = { components: [
	{
		c: TransformComponent,
		d: {
			x: 50,
			y: 50,
			scaleX: 1,
			scaleY: 1,
			zIndex: 4
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Getaway Van Heist",
			align: TextAlign.left,
			spacing: -2,
			spaceWidth: 9,
			lineHeight: 70,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fontGreasyStroke",
				scale: 3 / 3,
				//tint: 0xe0b86c,
				alpha: 1
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			duration: 1,
			values: [0, 1],
			repeat: false,
		}
	},
], children: [
	levelTitleBaseObjectiveTitle,
	levelTitleBaseObjectiveText,
	levelTitleBaseObjectiveSkipToMap,
]};

var levelTitleBaseNoChild = { components: [
	{
		c: TransformComponent,
		d: {
			x: 50,
			y: 50,
			scaleX: 1,
			scaleY: 1,
			zIndex: 4
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Getaway Van Heist",
			align: TextAlign.left,
			spacing: -2,
			spaceWidth: 9,
			lineHeight: 70,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fontGreasyStroke",
				scale: 3 / 3,
				//tint: 0xe0b86c,
				alpha: 1
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			duration: 1,
			values: [0, 1],
			repeat: false,
		}
	},
]};

var levelTitleTutorialKiosk = { extend: levelTitleBaseNoChild, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "Kiosk snag",
		},
	},
], children: [
	{
		extend: levelTitleBaseObjectiveTitle,
		components: [
			{
				c: PixelTextComponent,
				d: {
					text: "Objective",
				},
			},
		]
	},
	{
		extend: levelTitleBaseObjectiveText,
		components: [
			{
				c: PixelTextComponent,
				d: {
					text: "-Rob the kiosk\n-Escape to the getaway vehicle",
				},
			},
		]
	},
/*
	{
		extend: levelTitleBaseObjectiveSkipToMap,
		components: [
			{
				c: PixelTextComponent,
				d: {
					text: "-Or click HERE to skip tutorial",
				},
			},
		]
	},
*/
]};

var levelTitleCircuit = { extend: levelTitleBaseNoChild, components: [
	{
		c: CircuitComponent,
		d: {
			toggleComponents: ["PixelTextComponent","TweenerComponent"],
			toggleChildren: true,
		}
	},
], children: [
	{
		extend: levelTitleBaseObjectiveTitle,
		components: [
			{
				c: PixelTextComponent,
				d: {
					text: "Objective",
				},
			},
		]
	},
	{
		extend: levelTitleBaseObjectiveText,
		components: [
			{
				c: PixelTextComponent,
				d: {
			//		text: "-Rob the kiosk\n-Escape to the getaway vehicle",
				},
			},
		]
	},
/*	{
		extend: levelTitleBaseObjectiveSkipToMap,
		components: [
			{
				c: PixelTextComponent,
				d: {
			//		text: "-Or click HERE to skip tutorial",
				},
			},
		]
	},
*/
]};

var objectiveUItest = { components: [
	{
		c: TransformComponent,
		d: {
			x: 20,
			y: 100,
			scaleX: 1,
			scaleY: 1,
			zIndex: 4
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "-Find your buddy Gregory\n-Steal the van with Gregory",
			align: TextAlign.left,
			spacing: -2,
			spaceWidth: 9,
			lineHeight: -70,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 1 / 3,
				tint: 0xe0b86c,
				alpha: 1
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			duration: 1,
			values: [0, 1],
			repeat: false,
		}
	},
]};

var objectiveUItestNull = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 10
		}
	},
], children: [
	objectiveUItest
]};

var testUIBlackout = { components: [
	{
		c: TransformComponent,
		d: {
			x: 200,
			y: 200,
			scaleX: 10000,
			scaleY: 10000,
			zIndex: -4
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "tiles",
			name: "black",
			defaultAnimationName: "default",
			loop: true,
		}
	},
	{
		c: TweenerComponent,
		d: {
	//		enabled: true,
			component: "SpriteComponent",
			field: "alpha",
			duration: 2,
			values: [0.8, 0.0],
			repeat: false
		}
	},
]};

var megaUIBlackout = { components: [
	{
		c: TransformComponent,
		d: {
			x: 200,
			y: 200,
			scaleX: 10000,
			scaleY: 10000,
			zIndex: 20
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "tiles",
			name: "black",
			defaultAnimationName: "default",
			loop: true,
		}
	},
	{
		c: TweenerComponent,
		d: {
	//		enabled: true,
			component: "SpriteComponent",
			field: "alpha",
			duration: 2,
			values: [1, 0.0],
			repeat: false
		}
	},
]};

var levelTitleOnUI = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: -1
		}
	},
], children: [
	{
		components: [
			{
				c: TransformComponent,
				d: {
					x: 100,
					y: 100,
					scaleX: 1,
					scaleY: 1,
					zIndex: -1
				}
			},
			{
				c: PixelTextComponent,
				d: {
					text: "THE HIDEOUT",
					align: TextAlign.left,
					spacing: -2,
					spaceWidth: 9,
					lineHeight: -70,
					fontDefinition: {
						layer: LayerDefinitions.LAYER_UI,
						sheet: "ui_fontGreasyStroke",
						scale: 1 / 1,
						tint: 0xe0b86c,
						alpha: 1
					}
				}
			},
			{
				c: TweenerComponent,
				d: {
					component: "PixelTextComponent",
					field: "alpha",
					duration: 1,
					values: [0, 1, 1, 1, 0],
					repeat: false,
				}
			},
		]
	},
	{
		components: [
			{
				c: TransformComponent,
				d: {
					x: 100,
					y: 150,
					scaleX: 1,
					scaleY: 1,
					zIndex: -1
				}
			},
			{
				c: PixelTextComponent,
				d: {
					text: "Your base of operations",
					align: TextAlign.left,
					spacing: -2,
					spaceWidth: 9,
					lineHeight: -70,
					fontDefinition: {
						layer: LayerDefinitions.LAYER_UI,
						sheet: "ui_fontGreasyStroke",
						scale: 1 / 3,
						tint: 0xe0b86c,
						alpha: 1
					}
				}
			},
			{
				c: TweenerComponent,
				d: {
					component: "PixelTextComponent",
					field: "alpha",
					duration: 1.3,
					values: [0, 1, 1, 1, 0],
					repeat: false,
				}
			},
		]
	},
	testUIBlackout,
]
};

//Shark punch logo on boot
var spLogoAlpha = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 1
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_title",
			name: "spLogo",
			alpha: 0,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "SpriteComponent",
			field: "alpha",
			duration: 2,
			values: [0,1,0],
			easing: EasingFunctions.linear,
			repeat: false
		}
	},
]};

var spLogoBounce = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 1
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "simpleLocalScale",
			duration: 0.5,
			values: [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0.8,1,0.8,1],
			easing: EasingFunctions.easeOutOver,
			repeat: true
		}
	},
], children: [
	spLogoAlpha,
]};

var spLogoBoot = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 1
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "simpleLocalScale",
			duration: 2,
			values: [0.6, 0.8],
			easing: EasingFunctions.easeOut,
			repeat: false
		}
	},
], children: [
	spLogoBounce,
	testUIBlackout
]};


var hideoutVehicleReminder = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: -1
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 8
		}
	},
], children: [
	{
		components: [
			{
				c: TransformComponent,
				d: {
					x: 50,
					y: 200,
					scaleX: 1,
					scaleY: 1,
					zIndex: -1
				}
			},
			{
				c: PixelTextComponent,
				d: {
					text: "$enterVehicle",
					align: TextAlign.left,
					spacing: -2,
					spaceWidth: 9,
					lineHeight: -70,
					fontDefinition: {
						layer: LayerDefinitions.LAYER_UI,
						sheet: "ui_fontGreasyStroke",
						scale: 1 / 3,
						tint: 0xe0b86c,
						alpha: 0
					}
				}
			},
			{
				c: TweenerComponent,
				d: {
					component: "PixelTextComponent",
					field: "alpha",
					duration: 1.3,
					values: [0, 1, 1, 1, 0],
					repeat: false,
				}
			},
		]
	},
]};

var hideoutVehicleReminderSpawner = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["hideoutVehicleReminder"],
			spawnOnFirstFrame: false,
			total: -1,
			interval: 20,
			maxInWorld: 1
		}
	}
]};

var levelCornerCardBG = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 1,
			y: 40,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "cornerCard",
			tint: 0xccb52b,
		//	defaultAnimationName: "wood",
		}
	},
]};

var levelCornerCard = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 300 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: -500, y: 300 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "\"TITLETITLE\"\n\nText row one\nText row two\nText row three",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			textWrapping: 178,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCardBG,
]};

var levelCornerCardCasinoHax = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 300 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: -500, y: 300 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "\"TITLETITLE\"\n\nText row one\nText row two\nText row three",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			textWrapping: 190,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCardBG,
]};

var levelCornerCardMiniBottomRightBG = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 1,
			scaleX: 0.9,
			scaleY: 0.33,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "cornerCard",
			tint: 0xccb52b,
		//	defaultAnimationName: "wood",
		}
	},
]};

var levelCornerCardMiniBottomRight = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			x:260,
			y:270,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 400 }, { x: -500, y: 400 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 },  { x: 260, y: 300 }, { x: 260, y: 300 }, { x: -500, y: 400 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Extra bit of text",
			lineHeight: -20,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			textWrapping: 140,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCardMiniBottomRightBG,
]};

var levelCornerCard2RowBottomRightBG = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 1,
			scaleX: 0.9,
			scaleY: 0.6,
			y: 10,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "cornerCard",
			tint: 0xccb52b,
		//	defaultAnimationName: "wood",
		}
	},
]};

var levelCornerCard2RowBottomRight = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			x:260,
			y:270,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 400 }, { x: -500, y: 400 }, { x: 260, y: 310 }, { x: 260, y: 310 }, { x: 260, y: 310 }, { x: 260, y: 310 }, { x: 260, y: 310 }, { x: 260, y: 310 },  { x: 260, y: 310 }, { x: 260, y: 310 }, { x: -500, y: 400 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Extra bit of text",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			textWrapping: 140,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCard2RowBottomRightBG,
]};

var levelCornerCard3RowBottomRightBG = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 1,
			scaleX: 0.9,
			scaleY: 0.8,
			y: 26,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "cornerCard",
			tint: 0xccb52b,
		//	defaultAnimationName: "wood",
		}
	},
]};

var levelCornerCard3RowBottomRight = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			x:260,
			y:270,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 400 }, { x: -500, y: 400 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 },  { x: 260, y: 300 }, { x: 260, y: 300 }, { x: -500, y: 400 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Extra bit of text",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			textWrapping: 140,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCard3RowBottomRightBG,
]};

var levelCornerCard4RowBottomRightBG = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 1,
			scaleX: 0.9,
			scaleY: 1.2,
			y: 26,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "cornerCard",
			tint: 0xccb52b,
		//	defaultAnimationName: "wood",
		}
	},
]};

var levelCornerCard4RowBottomRight = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			x:260,
			y:270,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 400 }, { x: -500, y: 400 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 },  { x: 260, y: 300 }, { x: 260, y: 300 }, { x: -500, y: 400 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Extra bit of text",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			textWrapping: 140,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCard4RowBottomRightBG,
]};

var levelCornerCard6RowBottomRightBG = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 1,
			scaleX: 0.9,
			scaleY: 1.4,
			y: 50,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "cornerCard",
			tint: 0xccb52b,
		//	defaultAnimationName: "wood",
		}
	},
]};

var levelCornerCard6RowBottomRight = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			x:260,
			y:270,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 400 }, { x: -500, y: 400 }, { x: 260, y: 280 }, { x: 260, y: 280 }, { x: 260, y: 280 }, { x: 260, y: 280 }, { x: 260, y: 280 }, { x: 260, y: 280 },  { x: 260, y: 280 }, { x: 260, y: 280 }, { x: -500, y: 400 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Extra bit of text",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			textWrapping: 140,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCard6RowBottomRightBG,
]};

var levelCornerCardCircuit = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			x: -1000,
			y: 300,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 300 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: 200, y: 200 }, { x: -500, y: 300 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: CircuitComponent,
		d: {
			toggleComponents: ["TweenerComponent", "SpriteComponent"],
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "\"TITLETITLE\"\n\nText row one\nText row two\nText row three",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCardBG,
]};

var levelCornerCardMiniBottomRightCircuit = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			x:-500,
			y:270,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 400 }, { x: -500, y: 400 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 }, { x: 260, y: 300 },  { x: 260, y: 300 }, { x: 260, y: 300 }, { x: -500, y: 400 }],
			easing: EasingFunctions.easeInOut,
		//	useUnadjustedFrameTime: true,
		}
	},
	{
		c: CircuitComponent,
		d: {
			toggleComponents: ["TweenerComponent", "SpriteComponent"],
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Extra bit of text",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCardMiniBottomRightBG,
]};

var levelCornerCardmemoBG = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			y: 40,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "cornerCard",
			tint: 0xccb52b,
		//	defaultAnimationName: "wood",
		}
	},
]};

var memoStealToUnlock = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 5,
			x: -500,
			y: 600,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -500, y: 600 }, { x: 294, y: 0 },/* { x: 200, y: 250 }, { x: 200, y: 250 }, { x: 200, y: 250 }, { x: 200, y: 250 }, { x: 200, y: 250 }, { x: 200, y: 250 }, { x: 200, y: 250 }, { x: 200, y: 250 }, { x: -500, y: 600 }*/],
			easing: EasingFunctions.easeInOut,
			useUnadjustedFrameTime: true,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$infoMemo",
			lineHeight: -24,
			align: TextAlign.center,
			spacing: -3,
			spaceWidth: 7,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 3,
				tint: 0x000000,
			}
		}
	},
], children: [
	levelCornerCardmemoBG,
]};

var memoStealToUnlockItem = { extend: memoStealToUnlock, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$infoWeaponUnlock",
		}
	},
]};

var memoStealToUnlockKnox = { extend: memoStealToUnlock, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$infoKnoxUnlock",
		}
	},
]};

var finalScoreTextBase = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			zIndex: 1,
			x: -25,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "final score text base",
			align: TextAlign.right,
			alpha: 0,
			spacing: -3,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 1/2,
			//	tint: 0xe0b86c
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			easing: EasingFunctions.linear,
			useUnadjustedFrameTime: false,
		}
	}
]};

var finalScoreTitle = { extend: finalScoreTextBase, components: [
	{
		c: TransformComponent,
		d: {
		//	y: 100,
			scaleX: 2,
			scaleY: 2,
			x: 0,
			y: -40
		}
	},
	{ c: PixelTextComponent, d: { text: "$finalScore", align: TextAlign.center, }},
	{
		c: TweenerComponent,
		d: {
			duration: 1,
			values: [0.0, 1.0],
		}
	}
]};

//SCORE TEXT FIELDS ON THE LEFT
var finalScoreTextHeists = { extend: finalScoreTextBase, components: [
	{ c: TransformComponent, d: { y: 50, }},
	{ c: PixelTextComponent, d: { text: "$scoreHeists", }},
	{ c: TweenerComponent, d: { duration: 3, values: [0, 1],}}
]};

var finalScoreTextKnox = { extend: finalScoreTextBase, components: [
	{ c: TransformComponent, d: { y: 100, }},
	{ c: PixelTextComponent, d: { text: "$scoreKnox", }},
	{ c: TweenerComponent, d: { duration: 3, values: [0.0, 1.0],}}
]};

var finalScoreTextPlaytime = { extend: finalScoreTextBase, components: [
	{ c: TransformComponent, d: { y: 150, }},
	{ c: PixelTextComponent, d: { text: "$playtime", }},
	{ c: TweenerComponent, d: { duration: 3, values: [0.0, 1.0],}}
]};

var finalScoreTextDiscovery = { extend: finalScoreTextBase, components: [
	{ c: TransformComponent, d: { y: 200, }},
	{ c: PixelTextComponent, d: { text: "$discovery", }},
	{ c: TweenerComponent, d: { duration: 3, values: [0.0, 1.0],}}
]};

var finalScoreTextGreens = { extend: finalScoreTextBase, components: [
	{ c: TransformComponent, d: { y: 250, }},
	{ c: PixelTextComponent, d: { text: "$greens", }},
	{ c: TweenerComponent, d: { duration: 3, values: [0.0, 1.0],}}
]};

//THE ACTUAL SCORES
var finalScoreBase = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			zIndex: 1,
			x: 25,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "score",
			align: TextAlign.left,
			spacing: -3,
			alpha: 0,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontGreasyStroke",
				scale: 1 / 2,
			//	tint: 0xe0b86c
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "PixelTextComponent",
			field: "alpha",
			easing: EasingFunctions.linear,
			useUnadjustedFrameTime: false,
		}
	}
]};

var finalScoreHeists = { tag: "heistsScore", extend: finalScoreBase, components: [
	{ c: TransformComponent, d: { y: 50, }},
	{ c: PixelTextComponent, d: { text: "$0", alpha: 0 }},
	{ c: TweenerComponent, d: { duration: 0.5, values: [0.0, 1.0],}}
]};

var finalScoreKnox = { tag: "knoxScore", extend: finalScoreBase, components: [
	{ c: TransformComponent, d: { y: 100, }},
	{ c: PixelTextComponent, d: { text: "$0M", alpha: 0 }},
	{ c: TweenerComponent, d: { duration: 0.5, values: [0.0, 1.0],}}
]};

var finalScorePlaytime = { tag: "playtime", extend: finalScoreBase, components: [
	{ c: TransformComponent, d: { y: 150, }},
	{ c: PixelTextComponent, d: { text: "0:00:00", alpha: 0 }},
	{ c: TweenerComponent, d: { duration: 0.5, values: [0.0, 1.0],}}
]};

var finalScoreDiscovery = { tag: "discover", extend: finalScoreBase, components: [
	{ c: TransformComponent, d: { y: 200, }},
	{ c: PixelTextComponent, d: { text: "0%", alpha: 0 }},
	{ c: TweenerComponent, d: { duration: 0.5, values: [0.0, 1.0],}}
]};

var finalScoreGreens = { tag: "greens", extend: finalScoreBase, components: [
	{ c: TransformComponent, d: { y: 250, }},
	{ c: PixelTextComponent, d: { text: "", alpha: 0 }},
	{ c: TweenerComponent, d: { duration: 0.5, values: [0.0, 1.0],}}
]};

var finalScoreContainer = { name: "finalScoreContainer", components: [
	{
		c: TransformComponent,
		d: {
			x: 420,
			y: 260,
		}
	},
], children: [
	finalScoreTitle,
	finalScoreTextHeists,
	finalScoreTextKnox,
	finalScoreTextPlaytime,
	finalScoreTextDiscovery,
	finalScoreTextGreens,
	finalScoreHeists,
	finalScoreKnox,
	finalScorePlaytime,
	finalScoreDiscovery,
	finalScoreGreens,
]};

var finalScoreContainerParent = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
], children: [
	finalScoreContainer,
]};

//CREDITS
var creditsTitle = { extend: finalScoreTextBase, components: [
	{
		c: TransformComponent,
		d: {
		//	y: 100,
			scaleX: 1.5,
			scaleY: 1.5,
			x: 0,
			y: -40,
		}
	},
	{ c: PixelTextComponent, d: { text: "A game by Shark Punch", align: TextAlign.center, alpha: 0, }},
	{
		c: TweenerComponent,
		d: {
			duration: 2.2,
			_getFirstValueFromTarget: true,
			values: [0.01, 0.01, 0.01, 0.010, 1.00, 1.00],
		}
	}
]};

var creditsThanksForPlaying = { extend: finalScoreTextBase, components: [
	{
		c: TransformComponent,
		d: {
		//	y: 100,
			scaleX: 1.5,
			scaleY: 1.5,
			x: 0,
			y: 2500,
		}
	},
	{ c: PixelTextComponent, d: { text: "$thanksForPlaying", align: TextAlign.center, alpha: 1, }},
	{
		c: TweenerComponent,
		d: {
			duration: 2.2,
			_getFirstValueFromTarget: true,
			values: [0.01, 1.00],
		}
	}
]};

var creditsLeft = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			zIndex: 1,
			x: -15,
			y: 25,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$creditsLeftB",
			align: TextAlign.right,
			alpha: 0,
			spacing: -1,
			spaceWidth: 3,
			lineHeight: -60,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fonts",
				scale: 1/3,
			//	tint: 0xe0b86c
			}
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 2.5,
			component: "PixelTextComponent",
			field: "alpha",
			_getFirstValueFromTarget: true,
			values: [0.01, 0.01, 0.01, 0.01, 0.01, 1.00],
			easing: EasingFunctions.linear,
			useUnadjustedFrameTime: false,
		}
	}
]};

var creditsRight = { extend: creditsLeft, components: [
	{
		c: TransformComponent,
		d: {
			x: 15,
			y: 25,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$creditsRightB",
			align: TextAlign.left,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fonts",
			//	scale: 1/3,
				tint: 0xffdc97
			}
		}
	},
]};

var blackBarOutro = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_intro",
			name: "black",
			defaultAnimationName: "default",
			tint: 0x000000,
		}
	},

	{
		c: TransformComponent,
		d: {
			scaleX: 40,
			scaleY: 2,
			zIndex: 25
		}
	},
]};

var blackBarTopOutro = { extend: blackBarOutro, components: [
	{
		c: TransformComponent,
		d: {
			y: -555,
		}
	},
], children: [
	blackBarOutro,
]};

var blackBarBottomOutro = { extend: blackBarOutro, components: [
	{
		c: TransformComponent,
		d: {
			y: 555,
		}
	},
], children: [
	blackBarOutro,
]};

var centeredCredits = { components: [
	{
		c: TransformComponent,
		d: {
			x: 720,
			y: 450,
		}
	},
], children: [
	blackBarTopOutro,
	blackBarBottomOutro,
]};

var creditsContainer = { components: [
	{
		c: TransformComponent,
		d: {
			x: 1080,
			y: 260,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 200,
			values: [{ x: 1080, y: 600 }, { x: 1080, y: -2100 }],
			easing: EasingFunctions.linear,
			repeat: false
		}
	},
], children: [
	creditsTitle,
	creditsLeft,
	creditsRight,
	creditsThanksForPlaying,
]};

var creditsContainerParent = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
], children: [
	creditsContainer,
	centeredCredits,
]};
