

/**
 * The rotating base entity for offscreen alerts
 */
var alertBase = { components: [
/*	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "offscreenAlert",
		}
	},
*/
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "ui-off-screen-bg-white"
		}
	},
]};

/**
 * The rotating base entity for offscreen alerts, when bad news
 */
var alertBaseNegative = { extend: alertBase, components: [
	{
		c: SpriteComponent,
		d: {
			name: "ui-off-screen-bg-red"
		}
	},
]};

/**
 * The rotating base entity for offscreen alerts, when good news
 */
var alertBasePositive = { components: [
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "offscreenAlert",
		}
	},
	{
		c: SpriteComponent,
		d: {
			name: "ui-off-screen-bg-green"
		}
	},
]};

var alertIconGoon = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 0.5,
			scaleY: 0.5,
			rotation: -Math.PI / 2,
			x: 0.015,
			y: 0.015,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "spriterCharacters",
			name: "goonA/head",
		}
	},
]};

var alertIconSawEnemy = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "ui-off-screen-info-exclamation"
		}
	},
]};

var alertIconEye = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 0.5,
			scaleY: 0.5,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "icon-reaction-witness",
		}
	},
]};

var goonCommandMarkerUIBase = { components: [
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_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],
			radius: 48,
		}
	},
	{
		c: TransformComponent,
		d: {
			ignoreParentRotation: true,
		}
	},
]};

var goonActionItem = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-options-enter",
		}
	},
	{
		c: TransformComponent,
	},
	{
		c: ClickableComponent,
	},
	{
		c: ColliderComponent,
		d: {
			width: 105,
			height: 26,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			allowRotation: false,
			isKinematic: false,
			isSensor: true,
			dynamicFriction: 0,
			density: 0.000000000001, // Without this, goonCommandMaker weighs the same as goon and goon needs to push this around while moving
		}
	},
]};

var goonTextNotification = { components: [
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 2
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			spacing: 2,// / Game.SCALE,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fonts",
			}
		}
	},
]};

var goonFace = { tag: "faceMenuFace", components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_faces",
			name: "goon",
		}
	},
	{
		c: TransformComponent,
		d: {
			x: -48,
			y: 0
		}
	},
]};

var faceMenuTooltip = { tag: "faceMenuTooltip", components: [
	{
		c: TransformComponent,
		d: {
			x: 6,
			y: 6,
			scaleX: 0.2,
			scaleY: 0.2,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "W",
			align: TextAlign.center,
			spacing: 2,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fonts",
				alpha: 0.75,
				tint: 0xFF0000
			}
		}
	},
]};

var faceMenuBehaviorTooltip = {
	tag: "faceMenuBehaviorTooltip", extend: faceMenuTooltip, components: []
};

var faceMenuItemTooltip = {
	tag: "faceMenuItemTooltip", extend: faceMenuTooltip , components: []
};

var faceMenuCharacterTooltip = { tag: "faceMenuCharacterTooltip", extend: faceMenuTooltip , components: [
	{
		c: TransformComponent,
		d: {
			x: -86,
			y: -38,
			scaleX: 0.25,
			scaleY: 0.25,
		}
	},
]};


var faceMenuBehaveIconBase = { tag: "faceMenuBehaveIcon", components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-behavior-aggressive-tiny",
			alpha: 0.5
		}
	},
	{
		c: TransformComponent,
		d: {
			x: 12,
			y: -36
		}
	},
	{
		c: ClickableComponent,
	},
	{
		c: ColliderComponent,
		d: {
			width: 22,
			height: 22,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
		}
	}
], children: [
	faceMenuBehaviorTooltip
]};

var faceMenuBehaveIcon1 = { extend: faceMenuBehaveIconBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 12,
			y: -36
		}
	},
]};

var faceMenuBehaveIcon2 = { extend: faceMenuBehaveIconBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 36,
			y: -36
		}
	},
]};

var faceMenuBehaveIcon3 = { extend: faceMenuBehaveIconBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 60,
			y: -36
		}
	},
]};

var faceMenuBehaveIcon4 = { extend: faceMenuBehaveIconBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 84,
			y: -36
		}
	},
]};

var faceMenuItemIconBase = { tag: "faceMenuItemIcon", components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-equip-knife-tiny",
			alpha: 0.5
		}
	},
	{
		c: TransformComponent,
		d: {
			x: 12,
			y: -12
		}
	},
	{
		c: ClickableComponent,
	},
	{
		c: ColliderComponent,
		d: {
			width: 22,
			height: 22,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
		}
	}
], children: [
	faceMenuItemTooltip
]};

var faceMenuItemIcon1 = { extend: faceMenuItemIconBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 12,
			y: -12
		}
	},
]};

var faceMenuItemIcon2 = { extend: faceMenuItemIconBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 36,
			y: -12
		}
	},
]};

var faceMenuItemIcon3 = { extend: faceMenuItemIconBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 60,
			y: -12
		}
	},
]};

var faceMenuItemIcon4 = { extend: faceMenuItemIconBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 84,
			y: -12
		}
	},
]};

var healthBarBar = { tag: "faceMenuHealthBar", components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-health-bar",
		}
	},
	{
		c: TransformComponent,
	},
]};

var healthBarBg = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-health-bg",
		}
	},
	{
		c: TransformComponent,
		d: {
			x: 4,
			y: 4
		}
	},
]};

var healthUI = { components: [
	{
		c: TransformComponent,
		d: {
			x: 44,
			y: 32
		}
	}], children: [
		healthBarBg,
		healthBarBar,
	]
};

var goonName = { tag: "infoName", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "Not yet set",
			align: TextAlign.center,
			spacing: -2,
			spaceWidth: 3,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "fontGreasySmallStroke",
				tint: 0xFFFF00
			}
		}
	},
]};

var goonLootCounter = { tag: "infoLootCounter", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 24,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$0",
			align: TextAlign.center,
			spacing: -2,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "fontGreasySmallStroke",
			}
		}
	},
]};

var characterInfoQuickKey = { tag: "infoQuickKey", components: [
	{
		c: TransformComponent,
		d: {
			x: -36,
			y: -16,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "TO BE REPLACED",
			align: TextAlign.center,
			spacing: -2,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "fontGreasySmallStroke",
			}
		}
	},
]};
var characterInfoItemIconAmmoCount = { tag: "itemAmmoCount", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -28,
			// To counter parent scale
			scaleX: 1.25,
			scaleY: 1.25,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "0",
			align: TextAlign.center,
			spacing: -2,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "fontGreasySmallStroke",
			}
		}
	},
]};

var characterInfoItemIconBG = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			scaleX: 1,
			scaleY: 1,
			zIndex: -1,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-base-bg-square",
			alpha: 0.9,
			tint: 0xb06420
		}
	},
]};

var characterInfoItemIcon = { tag: "itemIcon", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			scaleX: 0.3,
			scaleY: 0.3,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-equip-knife-tiny",
			alpha: 1
		}
	},
], children: [
	characterInfoItemIconAmmoCount,
	characterInfoItemIconBG
]};

var characterInfoItemRow = { tag: "itemRow", components: [
	{
		c: TransformComponent,
		d: {
			x: -36,
			y: -40,
		}
	},
], children: [
	characterInfoItemIcon,
	characterInfoItemIcon,
	characterInfoItemIcon,
	characterInfoItemIcon,
	characterInfoItemIcon,
	characterInfoItemIcon,
	characterInfoItemIcon,
	characterInfoItemIcon,
	characterInfoItemIcon,
	characterInfoItemIcon,
]};

var characterInfoOffset = { tag: "infoOffset", components: [
	{
		c: TransformComponent,
		d: {
			ignoreParentRotation: true,
			x: 0,
			y: 64
		}
	}
	], children: [
		goonName,
		goonLootCounter,
		characterInfoQuickKey,
	]
};

var characterInfo = { tag: "infoRow", components: [
	// Collider and RigidBody are only here so we can use "copyPositionFrom"
	{
		c: ColliderComponent,
		d: {
			radius: 1,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: false,
			allowRotation: false,
		}
	},
	{
		c: TransformComponent,
		d: {
			ignoreParentRotation: true,
		}
	}
	], children: [
		characterInfoItemRow,
		characterInfoOffset
	]
};

var faceMenu = { tag: "faceMenu", components: [
	{
		c: TransformComponent,
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_faces",
			name: "on-screen-face-menu",
			defaultAnimationName: "unselected",
		}
	},
	{
		c: ClickableComponent,
	},
	{
		c: ColliderComponent,
		d: {
			width: 192,
			height: 96,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
		}
	}], children: [
		goonFace,
		faceMenuCharacterTooltip,
		/*
		faceMenuBehaveIcon1,
		faceMenuBehaveIcon2,
		faceMenuBehaveIcon3,
		faceMenuBehaveIcon4,
		*/
		faceMenuItemIcon1,
		faceMenuItemIcon2,
		faceMenuItemIcon3,
		faceMenuItemIcon4,
		goonLootCounter,
		goonName,
		healthUI,
	]
};

var emptyCharacterMenuIcon = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-base-bg-circle",
			alpha: 0.5,
			tint: 0x363432
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 0.6,
			scaleY: 0.6,
			zIndex: 100
		}
	},
]};

var characterMenuIconBase = { tag: "characterMenuIconBase", components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-base-bg-circle",
			alpha: 0.85,
			tint: 0x8d8985
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 0.8,
			scaleY: 0.8,
			zIndex: 100
		}
	},
	{
		c: ClickableComponent,
	},
	{
		c: ColliderComponent,
		d: {
			radius: 23,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE],
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: true,
			density: 0.0000000000000000001,
		}
	}
], children: [
	{
		tag: "characterMenuIcon",
		components: [
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_UI,
					sheet: "ui",
					name: "temptemptempt",
				}
			},
			{
				c: TransformComponent,
				d: {
					zIndex: 101
				}
			},
		]
	},
	{
		tag: "characterMenuIconTooltipRow1",
		components: [
			{
				c: TransformComponent,
				d: {
					x: -30,
					y: -87,
					// TO counter parent scale..
					scaleX: 1.33,
					scaleY: 1.33,
					zIndex: 103,
				}
			},
			{
				c: PixelTextComponent,
				d: {
					text: "Tooltip",
					align: TextAlign.left,
					spacing: -2,
					fontDefinition: {
						layer: LayerDefinitions.LAYER_UI,
						sheet: "fontGreasySmallStroke",
						alpha: 1.00,
						tint: 0xFFFF00
					}
				}
			},
		]
	},
	{
		tag: "characterMenuIconTooltipRow2",
		components: [
			{
				c: TransformComponent,
				d: {
					x: -30,
					y: -55,
					// TO counter parent scale..
					scaleX: 1.33,
					scaleY: 1.33,
					zIndex: 103,
				}
			},
			{
				c: PixelTextComponent,
				d: {
					text: "Tooltip",
					align: TextAlign.left,
					spacing: -2,
					fontDefinition: {
						layer: LayerDefinitions.LAYER_UI,
						sheet: "fontGreasySmallStroke",
						alpha: 1.00,
						//tint: 0xFFFFFF
					}
				}
			},
		]
	},
	{
		tag: "characterMenuIconQuickKey",
		components: [
			{
				c: TransformComponent,
				d: {
					x: -30,
					y: 25,
					zIndex: 102,
				}
			},
			{
				c: PixelTextComponent,
				d: {
					enabled: false,
					text: "E",
					align: TextAlign.center,
					spacing: -2,
					fontDefinition: {
						layer: LayerDefinitions.LAYER_UI,
						sheet: "fontGreasySmallStroke",
					}
				}
			}
		]
	},
	{
		tag: "characterMenuIconAmount",
		components: [
			{
				c: TransformComponent,
				d: {
					x: 30,
					y: 25,
					zIndex: 102,
				}
			},
			{
				c: PixelTextComponent,
				d: {
					enabled: false,
					text: "0",
					align: TextAlign.center,
					spacing: -2,
					fontDefinition: {
						layer: LayerDefinitions.LAYER_UI,
						sheet: "fontGreasySmallStroke",
					}
				}
			}
		]
	},
]};

var characterMenu = { tag: "characterMenu", components: [
	{
		c: TransformComponent,
	},
	{
		c: ClickableComponent,
	},
	// This is actually only needed for the children..
	{
		c: ColliderComponent,
		d: {
			radius: 1,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			isSensor: false,
			allowRotation: false,
		}
	}
]};

var actionTooltip = { tag: "actionTooltip", components: [
	{
		c: TransformComponent,
		d: {
			x: 0.0,
			y: 0.0,
			ignoreParentRotation: true,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "ui-options-miniIcon",
		}
	},
], children: [
	{
		tag: "actionTooltipIcon",
		components: [
			{
				c: TransformComponent,
				d: {
					x: 0.0,
					y: 0.5,
				}
			},
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_IN_GAME_UI,
					sheet: "ingame-ui",
					name: "ui-health-bar",
				}
			},
				/*
			{
				c: PixelTextComponent,
				d: {
					text: "ACTION",
					align: TextAlign.center,
					spacing: 2,
					fontDefinition: {
						layer: LayerDefinitions.LAYER_IN_GAME_UI,
						sheet: "fonts",
					}
				}
			},
			*/
		]
	}
]};

var intimidatorIndicator = { tag: "intimidatorIndicator", components: [
	{
		c: TransformComponent,
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR_OBJECTS,
			sheet: "ingame-ui",
			name: "fov-cone-intimidate",
			alpha: 0.6,
		}
	},
]};

var witnessIndicator = { tag: "witnessIndicator", components: [
	{
		c: TransformComponent,
		d: {
			x: 0.0,
			y: 0.0,
			scaleX: 0.5,
			scaleY: 0.5,
			ignoreParentRotation: true,
		}
	},
	/*{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "iconReactionBG",
			tint: 0xE44824,
			alpha: 0.3
		}
	},*/
], children: [
	{
		tag: "witnessIndicatorEye",
		components: [
			{
				c: TransformComponent,
			},
			/*
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_IN_GAME_UI,
					sheet: "ingame-ui",
					name: "icon-reaction-witness",
					defaultAnimationName: "active",
				}
			}*/
		]
	}
]};

var coneBase = { tag: "statusCone", components: [
	{
		c: TransformComponent,
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "ingame-ui",
		}
	},
]};

var coneGreen = { extend: coneBase, components: [
	{
		c: SpriteComponent,
		d: {
			name: "fov-cone-green",
		}
	},
]};

var coneRed = { extend: coneBase, components: [
	{
		c: SpriteComponent,
		d: {
			name: "fov-cone-red",
		}
	},
]};

var coneYellow = { extend: coneBase, components: [
	{
		c: SpriteComponent,
		d: {
			name: "fov-cone-yellow",
		}
	},
]};

var coneBlue = { extend: coneBase, components: [
	{
		c: SpriteComponent,
		d: {
			name: "fov-cone-blue",
		}
	},
]};

var coneFlashingRed = { extend: coneRed, components: [
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.1,
			values: [1.0, 0.0, 1.0],
			repeat: true
		}
	}
]};

var intimidatedIndicator = { tag: "intimidatedIndicator", components: [
	{
		c: TransformComponent,
		d: {
			x: 0.0,
			y: 0.0,
			scaleX: 0.5,
			scaleY: 0.5,
			ignoreParentRotation: true,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "iconReactionBG",
			tint: 0x6AADF8,
			alpha: 0.15
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 0.3,
			component: "TransformComponent",
			field: "simpleLocalScale",
			values: [0.6, 0.5],
			easing: EasingFunctions.easeOutOver,
			useUnadjustedFrameTime:true,
		}
	}
], children: [
	{
		tag: "intimidatedIndicatorHands",
		components: [
			{
				c: TransformComponent,
				d: {
					scaleX: 0.75,
					scaleY: 0.75,
				}
			},/*
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_IN_GAME_UI,
					sheet: "ingame-ui",
					name: "icon-reaction-holdup",
					defaultAnimationName: "normal",
					alpha: 0.8
				}
			}*/
		]
	}
]};

var smallWitnessIcon = { tag: "smallWitnessIcon", components: [
	{
		c: TransformComponent,
		d: {
			x: 0.25,
			y: 0.25,
			scaleX: 0.25,
			scaleY: 0.25,
			ignoreParentRotation: true,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "iconReactionBG",
			tint: 0xE44824,
			alpha: 0.3,
			ignoreParentVisibility: true
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.1,
			values: [1.0, 0.0, 1.0],
			repeat: true
		}
	}
], children: [
	{
		tag: "smallWitnessIconEye",
		components: [
			{
				c: TransformComponent,
			},
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_IN_GAME_UI,
					sheet: "ingame-ui",
					name: "icon-reaction-witness",
					defaultAnimationName: "normal",
				}
			}
		]
	}
]};

var actionIndicator = { tag: "actionIndicator", components: [
	{
		c: TransformComponent,
		d: {
			x: 0.0,
			y: 0.0,
			ignoreParentRotation: true,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "ui-action-shout",
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 0.3,
			component: "TransformComponent",
			field: "simpleLocalScale",
			values: [1.25, 1],
			easing: EasingFunctions.easeOutOver,
			useUnadjustedFrameTime:true,
		}
	}
], children: [
	{ tag: "actionIndicatorRotation", components: [
		{
			c: TransformComponent,
			d: {
				x: 0.0,
				y: 0.0,
				ignoreParentRotation: true,
			}
		},
		{
			c: SpriteComponent,
			d: {
				visible: false,
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "ingame-ui",
				name: "ui-waypoint-direction",
			}
		},
	]}
]};

var selectionIndicatorBottom = { tag: "selectionIndicator", components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR_OBJECTS,
			sheet: "ingame-ui",
			name: "ui-waypoint-unitSelect",
			scale: 0.9,
			alpha: 0.3,
		}
	},
]};

var selectionIndicator = { tag: "selectionIndicator", components: [
	{
		c: TransformComponent
	},
	{
		c: TweenerComponent,
		d: {
			duration: 0.3,
			component: "TransformComponent",
			field: "simpleLocalScale",
			values: [1.25, 1],
			easing: EasingFunctions.easeOutOver,
			useUnadjustedFrameTime:true,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "ui-waypoint-unitSelect",
			scale: 0.9,
		}
	},
], children: [
	selectionIndicatorBottom
]};

var offscreenGoonIndicator = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: OffscreenAlertComponent,
		d: {
			useParentAsTarget: true,
			detachFromParent: true,
			lifetime: -1,
			baseTint: 0xD6A43D,
			copyParentSpriteSheetAndName: true,
			baseDefinition: alertBase,
			iconDefinition: alertIconGoon,
		}
	},
]};

