// The entity that will be shown "full screen" when a memo component is picked up.
var memoTopBar = { components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 4,
			y: -45,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_memo",
			name: "memoTop",
			defaultAnimationName: "wood",
		}
	},
]};

var screenEntityBase = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_memo",
			name: "memo",
			defaultAnimationName: "shoddy",
			tint: 0xcfcd81,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 0.9,
			values: [{ x: 512, y: 3000 }, { x: 512, y: 400 }],
			easing: EasingFunctions.easeOut,
			useUnadjustedFrameTime: true,
		}
	},
	{
		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,
		}
	},
	{
		c: TransformComponent,
		d: {
			x: 512,
			y: 3000,
			zIndex: 3,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			lineHeight: -39,
			spaceWidth: 10,
			align: TextAlign.center,
			verticalAlign: TextAlignVertical.center,
			spacing: -1,
			textWrapping: 230,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontComic",
				scale: 2 / 4,
				tint: 0x000000
			}
		}
	},
], children: [
	memoTopBar,
]};

var screenEntityUnlockBase = { extend: screenEntityBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 512,
			y: 3000,
			zIndex: 3,
		}
	},
], children: [
	memoStealToUnlock,
]};

var screenEntityUnlockSewerBase = { extend: screenEntityBase, components: [
	{
		c: TransformComponent,
		d: {
			x: 512,
			y: 3000,
			zIndex: 3,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_knox",
			name: "sewer",
			defaultAnimationName: "map",
			tint: 0xcfcd81,
		}
	},
], children: [
	memoStealToUnlockKnox,
]};

var screenEntityBlue = { extend: screenEntityBase, components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_memo",
			name: "memo",
			defaultAnimationName: "shoddy",
			tint: 0xbac6eb,
		}
	},
], children: [
	memoTopBar,
]};

var polaroidBG = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 9,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "map",
			name: "polaroid",
		}
	}
]};

var levelNameOnPolaroid = { tag: "levelName", components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -0.95,
			zIndex: 11,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "",
			align: TextAlign.center,
			spacing: -1,
			spaceWidth: 5,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fontGreasyStroke",
				scale: 0.4,
				tint: 0xe0b86c,
			}
		}
	}
]};

var mapPolaroidObjective = { tag:"objective", components: [
	{
		c: TransformComponent,
		d: {
			zIndex: 23
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "objective",
			align: TextAlign.left,
			spacing: -1,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_IN_GAME_UI,
				sheet: "fontComic",
				scale: 2 / 4,
				tint: 0xffffff,
				alpha: 0
			}
		}
	},
]};

var polaroidObjectiveBG = { tag: "objectiveBG", components: [
	{
		c: TransformComponent,
		d: {
			x: 1.32,
			y: -0.5,
			zIndex: 21,
			scaleX: -1.5,
			scaleY: 4,
		}
	},
	{
		c: SpriteComponent,
		d: {
			enabled: false,
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ingame-ui",
			name: "ui",
			defaultAnimationName: "objectiveBG",
		}
	}

]};

var mapPolaroidObjectives = { tag: "mapObjectives", components: [
	{
		c: TransformComponent,
		d: {
			x: 1,
			y: 0.6,
			zIndex: 23,
			ignoreParentRotation: false
		}
	},
], children: [
	polaroidObjectiveBG
]};

// Base for the element that appears on the map screen for each unlockable.
var photoBase = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 8,
			scaleX: 0.7,
			scaleY: 0.7,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "ui_map",
			name: "photo-filler",
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 1,
			values: [{ x: -10, y: 10 }, { x: 0, y: 0 }],
			easing: EasingFunctions.easeInOut,
			useUnadjustedFrameTime: true,
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			isSensor: true,
		}
	},
	{
		c: ColliderComponent,
		d: {
			width: 1.5,
			height: 1.5,
			collisionGroup: CollisionCategoryDefinitions.CC_UI,
			senses: [CollisionCategoryDefinitions.CC_MOUSE]
		}
	},
], children: [
	polaroidBG,
	levelNameOnPolaroid,
	mapPolaroidObjectives
]};

// Base for the element when an item has been picked up and is shown on the level end screen.
var unlockElement = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-base-icon-memo",
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localScale",
			duration: 1,
			values: [{ x: 2, y: 2 }, { x: 1, y: 1 }],
			easing: EasingFunctions.easeInOut,
			useUnadjustedFrameTime: true,
		}
	},
	{
		c: TransformComponent,
		d: {
			zIndex: 3,
		}
	},
]};


// Base for the element when an item has NOT been picked up and is shown on the level end screen.
var notFoundElement = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui",
			name: "ui-base-icon-memo",
			alpha: 0.2,
		}
	},
	{
		c: TransformComponent,
		d: {
			zIndex: 3,
		}
	},
]};

// Base for memo items lying on the ground.
var memoBase = { extend: userPickableItemBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: screenEntityBase,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "inventory",
			name: "droppedCash",
			defaultAnimationName: "default",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "A memo",
			inventorySpriteName: "ui-base-icon-dollar",
			removeAfterLevel: true,
			respawnable: true,
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "",
			item: "",
			target: "",
			unlockedElement: unlockElement,
			notFoundElement: notFoundElement,
			onMapElement: photoBase,
		}
	}
]};

var noUnlockMemoBase = { extend: userPickableItemBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: screenEntityBase,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "inventory",
			name: "droppedCash",
			defaultAnimationName: "default",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "A memo",
			inventorySpriteName: "ui-base-icon-dollar",
		}
	},
]};

var blinkyBaseAlpha = { components: [
	{
		c: TransformComponent,
		d: {
			//y: 3,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
			defaultAnimationName: "shine",
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 1,
			values: [1, 0, 0],
			repeat: true
		}
	},
]};

var blinkyBase = { components: [
	{
		c: TransformComponent,
		d: {
			//y: 3,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "TransformComponent",
			field: "simpleLocalScale",
			duration: 1,
			values: [1, 1.5 ,1.5],
			repeat: true
		}
	},
], children: [
	blinkyBaseAlpha
]};

var shinyBase = { components: [
	{
		c: TransformComponent,
		d: {
			//y: 3,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
			defaultAnimationName: "shine",
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 1,
			values: [0, 0.7, 0],
			repeat: true
		}
	},
], children: [
	blinkyBase
]};


/*********************
*  MEMOS/ITEMS SHOWN ON SCREEN WHEN PICKED UP:
**********************/

var secretToEveryoneMemo = { extend: screenEntityBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$secretToEveryoneMemo",

		},
	},
]};

var minimartFlyer = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$minimartFlyer",

		},
	},
]};

var jewelryNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$jewelryNote",

		},
	},
]};

var hardwareNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$jewelryNote",

		},
	},
]};

var horsePlayNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$horsePlayNote",

		},
	},
]};

var warehouseNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$warehouseNote",

		},
	},
]};

var BBBankNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$BBBankNote",

		},
	},
]};

var artGalleryNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$artGalleryNote",

		},
	},
]};

var alleyNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$alleyNote",
		},
	},
]};

var impoundNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$impoundNote",
		},
	},
]};

var superFlyNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$superFlyNote",
		},
	},
]};

var dinerNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$dinerNote",
		},
	},
]};

var arcadeNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$arcadeNote",
		},
	},
]};

var pierNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$pierNote",
		},
	},
]};

var officeNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$officeNote",
		},
	},
]};

var policeStationNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$policeStationNote",
		},
	},
]};

var whiteHouseNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$whiteHouseNote",
		},
	},
]};

var casinoNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$casinoUnlock",
		},
	},
]};

var fortAccessNote = { extend: screenEntityUnlockBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$fortAccessUnlock",
		},
	},
]};

var fortKnoxNote = { extend: screenEntityUnlockSewerBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$fortKnoxUnlock",
		},
	},
]};

var impoundPoliceMemo = { extend: screenEntityBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$impoundPoliceMemo",
		},
	},
]};

//NON UNLOCK MEMOS

var memoJail = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoJail",
		},
	},
]};

var memoTutorial = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoTutorial",
		},
	},
]};

var memoDinerSecurity = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoDinerSecurity",
		},
	},
]};

var memoArcadeRed = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoArcadeRed",
		},
	},
]};

var memoPierBridge = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoPierBridge",
		},
	},
]};

var memoPDRansom = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoPDRansom",
		},
	},
]};

var memoWhiteHouseSecretService = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoWhiteHouseSecretService",
		},
	},
]};

var memoWhiteHouseSecurityCheck = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoWhiteHouseSecurityCheck",
		},
	},
]};

var memoWhiteHouseToiletCodes = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoWhiteHouseToiletCodes",
		},
	},
]};

var memoWhiteHouseKeyCodes = { extend: screenEntityBlue, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$memoWhiteHouseKeyCodes",

		},
	},
]};
/**********************
*   SCREEN ELEMENTS FOR FOUND ITEMS ON LEVEL END SCREEN:
**********************/

// Create these for each unlock and add changes to the sprite etc.
var barUnlockedElement = { extend: unlockElement, components: [

]};

// Create these for each unlock and add changes to the sprite etc.
var barNotFoundElement = { extend: notFoundElement, components: [

]};

// Create these for each unlock and add changes to the sprite etc.
var emptinessPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.1,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (50 - 750) / 128, y: (0 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Emptiness",
		}
	}
]};

var barPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.1,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (450 - 750) / 128, y: (-350 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Bar",
		}
	}
]};

var kioskPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.12,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (240 - 750) / 128, y: (-400 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Kiosk Snag",
		}
	}
]};

var minimartPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.07,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (650 - 750) / 128, y: (-480 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Minimart",
		}
	}
]};

var hardwarePhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.06,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (860 - 990) / 128, y: (-500 + 100) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Hardware Store",
		}
	}
]};

var jewelryStorePhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.06,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (860 - 750) / 128, y: (-500 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Jewelry Store",
		}
	}
]};

var centralBBBankPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.03,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (1333 - 750) / 128, y: (-485 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Central BB Bank",
		}
	}
]};

var warehousePhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.1,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (-40) / 128, y: (690) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Warehouse",
		}
	}
]};

var horseplayPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.01,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (910 - 750) / 128, y: (-760 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Horseplay",
		}
	}
]};

var artGalleryPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.02,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (940 - 750) / 128, y: (-1000 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Art Gallery",
		}
	}
]};

var suspiciousAlleyPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.1,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (1136 - 750) / 128, y: (-870 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Suspicious Alley",
		}
	}
]};

var policeImpoundPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.05,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (1150 - 750) / 128, y: (-1120 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Police Impound",
		}
	}
]};

var superFlyPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.1,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (1360 - 750) / 128, y: (-1120 + 500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Super Fly",
		}
	}
]};

var dinerPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.02,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (-20) / 128, y: (255) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Diner",
		}
	}
]};

var arcadePhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.02,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (50) / 128, y: (490) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Arcade",
		}
	}
]};

var pierPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.02,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (150) / 128, y: (870) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Pier",
		}
	}
]};

var officePhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.01,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (770) / 128, y: (245) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Office",
		}
	}
]};

var policeStationPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 0.04,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (790) / 128, y: (500) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Police Station",
		}
	}
]};

var whiteHousePhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.02,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: (850) / 128, y: (770) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Pres. Palace",
		}
	}
]};

var casinoPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.02,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: 840 / 128, y: (-70) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Casino",
		}
	}
]};

var fortAccessPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.02,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: 1090 / 128, y: (-120) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Fort Access",
		}
	}
]};

var fortKnoxPhoto = { extend: photoBase, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -0.02,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: false,
			values: [{ x: -20, y: -20 }, { x: 1300 / 128, y: (-90) / 128 }],
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Fort Knox",
		}
	}
]};
/**********************
*   UNLOCK ITEMS:
**********************/

var minimartUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: minimartFlyer,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "MinimartFlyer",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Minimart",
			onMapElement: minimartPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "barObjective3",
		}
	}
], children: [
	shinyBase
]};

var emptinessUnlock = { extend: memoBase, components: [
	{
		c: UnlockComponent,
		d: {
			level: "Emptiness",
		//	unlockedElement: barUnlockedElement,
		//	notFoundElement: barNotFoundElement,
			onMapElement: emptinessPhoto,
		}
	},
]};

var barUnlock = { extend: memoBase, components: [
	{
		c: UnlockComponent,
		d: {
			level: "Bar",
		//	unlockedElement: barUnlockedElement,
		//	notFoundElement: barNotFoundElement,
			onMapElement: barPhoto,
		}
	},
]};

var kioskUnlock = { extend: memoBase, components: [
	{
		c: UnlockComponent,
		d: {
			level: "Kiosk Snag",
			onMapElement: kioskPhoto,
		}
	}
]};

var hardwareUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: hardwareNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "HardwareNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Hardware Store",
			onMapElement: hardwarePhoto,
		}
	},
	/*{
		c: ObjectiveComponent,
		d: {
			name: "minimartObjective4",
		}
	}*/
], children: [
	shinyBase
]};

var jewelryUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: jewelryNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "JewelryNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Jewelry Store",
			onMapElement: jewelryStorePhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "minimartObjective4",
		}
	}
], children: [
	shinyBase
]};

var centralBBBankUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: BBBankNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "BankNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Central BB Bank",
			onMapElement: centralBBBankPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "jewelryObjective3",
		}
	}
], children: [
	shinyBase
]};

var warehouseUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: warehouseNote,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "arcadeObjective3",
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "WarehouseMemo",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Warehouse",
			onMapElement: warehousePhoto,
		}
	}
], children: [
	shinyBase
]};

var horseplayUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: horsePlayNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "HorseMuseumFlyer",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Horseplay",
			onMapElement: horseplayPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "jewelryObjective3",
		}
	}
], children: [
	shinyBase
]};

var artGalleryUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: artGalleryNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "ArtGalleryNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Art Gallery",
			onMapElement: artGalleryPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "horseplayObjective3"
		}
	}
], children: [
	shinyBase
]};

var alleyUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: alleyNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "AlleyNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Suspicious Alley",
			onMapElement: suspiciousAlleyPhoto,
		}
	}
], children: [
	shinyBase
]};

var policeImpoundUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: impoundNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "ImpoundNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Police Impound",
			onMapElement: policeImpoundPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "galleryObjective3",
		}
	}
], children: [
	shinyBase
]};

var superFlyUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: superFlyNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "SFAddress",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Super Fly",
			onMapElement: superFlyPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "impoundObjective3"
		}
	}
], children: [
	shinyBase
]};

var dinerUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: dinerNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "DinerFlyer",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Diner",
			onMapElement: dinerPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "minimartObjective5",
		}
	}
], children: [
	shinyBase
]};


var arcadeUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: arcadeNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "ArcadeFlyer",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Arcade",
			onMapElement: arcadePhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "dinerObjective2"
		}
	}
], children: [
	shinyBase
]};

var pierUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: pierNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "FreightNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Pier",
			onMapElement: pierPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "warehouseObjective1"
		}
	}
], children: [
	shinyBase
]};

var officeUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: officeNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "OfficeNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Office",
			onMapElement: officePhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "bankObjective3",
		}
	}
], children: [
	shinyBase
]};

var policeStationUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: policeStationNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "PoliceStationNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Police Station",
			onMapElement: policeStationPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "officeObjective4",
		}
	}
], children: [
	shinyBase
]};

var whiteHouseUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: whiteHouseNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "WhiteHouseNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Pres. Palace",
			onMapElement: whiteHousePhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "policeStationObjective3"
		}
	}
], children: [
	shinyBase
]};

var casinoUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: casinoNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "CasinoNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Casino",
			onMapElement: whiteHousePhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "bankObjective4",
		}
	}
], children: [
	shinyBase
]};

var fortAccessUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: fortAccessNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "KnoxUnlock",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Fort Access",
			onMapElement: fortAccessPhoto,
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "casinoObjective4",
		}
	}
], children: [
	shinyBase
]};

var fortKnoxUnlock = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: fortKnoxNote,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "KnoxAccessMap",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
	{
		c: UnlockComponent,
		d: {
			level: "Fort Knox",
			onMapElement: fortKnoxPhoto,
		}
	}
], children: [
	shinyBase
]};

var impoundPoliceMemoItem = { extend: noUnlockMemoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: impoundPoliceMemo,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteGeneric",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "ImpountNote2",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
			removeAfterLevel: true,
			respawnable: true,
		}
	},
], children: [
	shinyBase
]};

//INFO ONLY MEMOS, TEMP, SHOULD BE MADE RE-READABLE, NOT GO TO INVENTORY

var memoJailItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoJail,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "jailNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
], children: [
	shinyBase
]};

var memoTutorialItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoTutorial,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "TutorialNote",
			inventorySpriteName: "ui-base-icon-memo",
		}
	},
], children: [
	shinyBase
]};

var memoDinerSecurityItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoDinerSecurity,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "DinerMemo",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},

], children: [
	shinyBase
]};

var memoArcadeRedItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoArcadeRed,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "ArcadeRedNote",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},
], children: [
	shinyBase
]};

var alleyMemo = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: secretToEveryoneMemo,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "AlleyMemo",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},
], children: [
	shinyBase
]};

var memoPierBridgeItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoPierBridge,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "CaptainsNote",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},
], children: [
	shinyBase
]};

var memoPDRansomItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoPDRansom,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "PDRansomNote",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},
], children: [
	shinyBase
]};

var memoWhiteHouseSecretServiceItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoWhiteHouseSecretService,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "WHSecretServiceNote",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},
], children: [
	shinyBase
]};

var memoWhiteHouseSecurityCheckItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoWhiteHouseSecurityCheck,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "WHSecurityNote",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},
], children: [
	shinyBase
]};

var memoWhiteHouseKeyCodesItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoWhiteHouseKeyCodes,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "WHKeyCodes",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},
], children: [
	shinyBase
]};

var memoWhiteHouseToiletItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: memoWhiteHouseToiletCodes,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteBlue",
			defaultAnimationName: "blue",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "WHToiletItem",
			inventorySpriteName: "ui-base-icon-memo",
			showInInventory: false,
		}
	},
], children: [
	shinyBase
]};

//WEAPONS UNLOCK MEMOS
var weaponMemoTitle = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -175,
			zIndex: 17,
			scale: 0.15,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$weaponUnlockTitle",
			spacing: 0,
			align: TextAlign.center,
			spaceWidth: 10,
			fontDefinition: {
				scale: 0.666,
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fonts",
				tint: 0x000000,
			}
		}
	},
]};

var weaponMemoDescriptionBase = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 33,
			zIndex: 15,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionSniper",
			lineHeight: -30,
			align: TextAlign.center,
			verticalAlign: TextAlignVertical.top,
			spacing: -2,
			spaceWidth: 10,
			textWrapping: 230,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontTypewriter",
				scale: 3 / 6,
				tint: 0x000000
			}
		},
	},
]};

var weaponMemoCodeBase = { components: [
	{
		c: TransformComponent,
		d: {
			x: 142,
			y: -40,
			zIndex: 15,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeSniper",
			lineHeight: -30,
			align: TextAlign.right,
			verticalAlign: TextAlignVertical.top,
			spacing: -1,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontTypewriter",
				scale: 2 / 6,
				tint: 0x000000
			}
		},
	},
]};

var weaponMemoLogoText = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 35,
			zIndex: 15,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "RK IND.",
			lineHeight: -60,
			align: TextAlign.center,
			verticalAlign: TextAlignVertical.center,
			spacing: -1,
			fontDefinition: {
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fontTypewriter",
				scale: 1 / 4,
				tint: 0x000000
			}
		},
	},
]};

var weaponMemoLogo = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 160,
			zIndex: 15,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_storeImages",
			name: "weapons",
			defaultAnimationName: "logo",
		}
	},
], children: [
	weaponMemoLogoText,
]};

var screenEntityBaseWeapons = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_memo",
			name: "memo",
			defaultAnimationName: "shoddy",
			tint: 0xcfcd81,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 0.9,
			values: [{ x: 512, y: 3000 }, { x: 512, y: 400 }],
			easing: EasingFunctions.easeOut,
			useUnadjustedFrameTime: true,
		}
	},
	{
		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,
		}
	},
	{
		c: TransformComponent,
		d: {
			x: 512,
			y: 3000,
			zIndex: 3,
		}
	},
	{
		c: PixelTextComponent,
		d: {
			text: "WEAPON NAME",
			align: TextAlign.center,
			spacing: 0,
			spaceWidth: 7,
			fontDefinition: {
				scale: 0.777,
				layer: LayerDefinitions.LAYER_UI,
				sheet: "ui_fonts",
				tint: 0x000000,
			}
		}
	},
], children: [
	memoStealToUnlockItem,
	weaponMemoTitle,
	weaponMemoLogo,
]};

var weaponMemoImageBorders = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: 0,
			zIndex: 15,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_storeImages",
			name: "weapons",
			defaultAnimationName: "borders",
		}
	},
]};

var weaponMemoImageBase = { components: [
	{
		c: TransformComponent,
		d: {
			x: 0,
			y: -90,
			zIndex: 15,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_UI,
			sheet: "ui_storeImages",
			name: "weapons",
			defaultAnimationName: "sniperFull",
		}
	},
], children: [
	weaponMemoImageBorders,
]};
//Weaponunlocks
//SNIPER
var weaponUnlockScreenSniper = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$titleSniper",
		}
	},
], children: [
	weaponMemoDescriptionBase,
	weaponMemoImageBase,
	weaponMemoCodeBase,
]};

var shinyBaseWeapon = { components: [
	{
		c: TransformComponent,
		d: {
			//y: 3,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteRK",
			defaultAnimationName: "shine",
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.4,
			values: [0, 1, 0],
			repeat: true
		}
	},
], children: [
//	blinkyBase
]};

var weaponUnlockSniperItem = { extend: memoBase, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenSniper,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "inventory",
			name: "itemPickableNoteRK",
			defaultAnimationName: "default",
		//	tint: 0xbac6eb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
			inventorySpriteName: "ui-base-icon-memo",
		//	showInInventory: false,
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "SniperUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "policeStationObjective4"
		}
	}
], children: [
	shinyBaseWeapon
]};

//SNIPER END

//SHOTGUN
var weaponMemoDescriptionShotgun = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionShotgun",
		},
	},
]};

var weaponMemoImageShotgun = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "shotgun",
		}
	},
]};

var weaponMemoCodeShotgun = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeShotgun",
		},
	},
]};

var weaponUnlockScreenShotgun = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$shotgun",
		}
	},
], children: [
	weaponMemoDescriptionShotgun,
	weaponMemoImageShotgun,
	weaponMemoCodeShotgun,
]};

var weaponUnlockShotgunItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenShotgun,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "ShotgunUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "galleryObjective4"
		}
	}
]};
//SHOTGUN END

//Python
var weaponMemoDescriptionPython = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionRevolver",
		},
	},
]};

var weaponMemoImagePython = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "python",
		}
	},
]};

var weaponMemoCodePython = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeRevolver",
		},
	},
]};

var weaponUnlockScreenPython = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$revolver",
		}
	},
], children: [
	weaponMemoDescriptionPython,
	weaponMemoImagePython,
	weaponMemoCodePython,
]};

var weaponUnlockPythonItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenPython,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "PythonUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "officeObjective3",
		}
	}
]};
//PYTHON END

//UZI
var weaponMemoDescriptionUzi = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionSMG",
		},
	},
]};

var weaponMemoImageUzi = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "smgUnlock",
		}
	},
]};

var weaponMemoCodeUzi = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeSMG",
		},
	},
]};

var weaponUnlockScreenUzi = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$SMG",
		}
	},
], children: [
	weaponMemoDescriptionUzi,
	weaponMemoImageUzi,
	weaponMemoCodeUzi,
]};

var weaponUnlockUziItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenUzi,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "UziUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "impoundObjective4"
		}
	}
]};
//UZI END

//PISTOL
var weaponMemoDescriptionPistol = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionPistol",
		},
	},
]};

var weaponMemoImagePistol = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "pistol",
		}
	},
]};

var weaponMemoCodePistol = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodePistol",
		},
	},
]};

var weaponUnlockScreenPistol = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$pistol",
		}
	},
], children: [
	weaponMemoDescriptionPistol,
	weaponMemoImagePistol,
	weaponMemoCodePistol,
]};

var weaponUnlockPistolItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenPistol,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "PistolUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "barObjective4"
		}
	}
]};
//PISTOL END

//SILENCED PISTOL
var weaponMemoDescriptionSilencedPistol = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionSilencedPistol",
		},
	},
]};

var weaponMemoImageSilencedPistol = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "silencedPistol",
		}
	},
]};

var weaponMemoCodeSilencedPistol = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeSilencedPistol",
		},
	},
]};

var weaponUnlockScreenSilencedPistol = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$silencedPistol",
		}
	},
], children: [
	weaponMemoDescriptionSilencedPistol,
	weaponMemoImageSilencedPistol,
	weaponMemoCodeSilencedPistol,
]};

var weaponUnlockSilencedPistolItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenSilencedPistol,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "SilencedPistolUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "horseplayObjective4"
		}
	}
]};
//SILENCED PISTOL END

//TRANQ PISTOL
var weaponMemoDescriptionTranqGun = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionTranquilizer",
		},
	},
]};

var weaponMemoImageTranqGun = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "tranqgun",
		}
	},
]};

var weaponMemoCodeTranqGun = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeTranquilizer",
		},
	},
]};

var weaponUnlockScreenTranqGun = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$tranquilizer",
		}
	},
], children: [
	weaponMemoDescriptionTranqGun,
	weaponMemoImageTranqGun,
	weaponMemoCodeTranqGun,
]};

var weaponUnlockTranqGunItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenTranqGun,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "TranqGunUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "pierObjective3"
		}
	}
]};
//TRANQ PISTOL END

//SMALL BOMB
var weaponMemoDescriptionSmallBomb = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionSmallBomb",
		},
	},
]};

var weaponMemoImageSmallBomb = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "watchBomb",
		}
	},
]};

var weaponMemoCodeSmallBomb = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeSmallBomb",
		},
	},
]};

var weaponUnlockScreenSmallBomb = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$smallBomb",
		}
	},
], children: [
	weaponMemoDescriptionSmallBomb,
	weaponMemoImageSmallBomb,
	weaponMemoCodeSmallBomb,
]};

var weaponUnlockSmallBombItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenSmallBomb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "WatchBombUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "warehouseObjective3"
		}
	}
]};
//SMALL BOMB END

//BIG BOMB
var weaponMemoDescriptionBigBomb = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionBigBomb",
		},
	},
]};

var weaponMemoImageBigBomb = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "clockBomb",
		}
	},
]};

var weaponMemoCodeBigBomb = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeBigBomb",
		},
	},
]};

var weaponUnlockScreenBigBomb = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$bigBomb",
		}
	},
], children: [
	weaponMemoDescriptionBigBomb,
	weaponMemoImageBigBomb,
	weaponMemoCodeBigBomb,
]};

var weaponUnlockBigBombItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenBigBomb,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "ClockBombUnlock",
		}
	},
	{
		c: ObjectiveComponent,
		d: {
			name: "mansionObjective4"
		}
	}
]};
//BIG BOMB END

//SAFECRACKER
var weaponMemoDescriptionSafecracker = { extend: weaponMemoDescriptionBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockDescriptionSafecracker",
		},
	},
]};

var weaponMemoImageSafecracker = { extend: weaponMemoImageBase, components: [
	{
		c: SpriteComponent,
		d: {
			defaultAnimationName: "safecracker",
		}
	},
]};

var weaponMemoCodeSafecracker = { extend: weaponMemoCodeBase, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$unlockCodeSafecracker",
		},
	},
]};

var weaponUnlockScreenSafecracker = { extend: screenEntityBaseWeapons, components: [
	{
		c: PixelTextComponent,
		d: {
			text: "$safecracker",
		}
	},
], children: [
	weaponMemoDescriptionSafecracker,
	weaponMemoImageSafecracker,
	weaponMemoCodeSafecracker,
]};

var weaponUnlockSafecrackerItem = { extend: weaponUnlockSniperItem, components: [
	{
		c: MemoComponent,
		d: {
			screenEntity: weaponUnlockScreenSafecracker,
		}
	},
	{
		c: ItemComponent,
		d: {
			name: "weaponFlier",
		}
	},
	{
		c: UnlockComponent,
		d: {
			target: "SafecrackerUnlock",
		}
	},
	/*
	{
		c: ObjectiveComponent,
		d: {
			name: "mansionObjective4"
		}
	}*/
]};
//SAFECRACKER
