var explosionSmallOld = { components: [
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "boom",
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "fx",
			name: "explosionMedium",
			loop: false,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.5
		}
	},
	{
		c: DamageComponent,
		d: {
			amount: 10,
			type: DamageType.explosion,
		}
	}, {
		c: ColliderComponent,
		d: {
			radius: 1.5 * 1,
			collisionGroup: CollisionCategoryDefinitions.CC_BULLETS,
			senses: [
				CollisionCategoryDefinitions.CC_CHARACTERS,
				CollisionCategoryDefinitions.CC_WALLS,
				CollisionCategoryDefinitions.CC_DOORS
			]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			isDynamic: true,
			isSensor: true,
		}
	},
]};

var explosionDamage = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: DamageComponent,
		d: {
			amount: 10,
			type: DamageType.explosion,
		}
	},
	{
		c: ColliderComponent,
		d: {
			radius: 1.3,
			collisionGroup: CollisionCategoryDefinitions.CC_BULLETS,
			senses: [
				CollisionCategoryDefinitions.CC_CHARACTERS,
				CollisionCategoryDefinitions.CC_WALLS,
				CollisionCategoryDefinitions.CC_STATIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DYNAMIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DOORS,
				CollisionCategoryDefinitions.CC_LIGHT_DYNAMIC_OBSTACLE
			],
			collidesWith: [
				CollisionCategoryDefinitions.CC_CHARACTERS,
				CollisionCategoryDefinitions.CC_WALLS,
				CollisionCategoryDefinitions.CC_STATIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DYNAMIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DOORS,
				CollisionCategoryDefinitions.CC_LIGHT_DYNAMIC_OBSTACLE
			]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			isDynamic: false,
			isSensor: true,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.2
		}
	},
	{
		c: CameraShakerComponent,
		d: {
			duration: 1,
			magnitude: 0.2,
		}
	},
]};

var detonator = { extend: explosionDamage, components: [
	{
		c: ColliderComponent,
		d: {
			radius: 0.05,
		}
	},
	{
		c: DamageComponent,
		d: {
			amount: 1,
			type: DamageType.fire,
		}
	},
	/*
	{
		c: SpriteComponent,
		d: {
			name: "fxHitPersonC",
		}
	},
	*/
]};

var explosionResidue = { components: [
	{
		c: SuspicionIncreaserComponent,
		d:{
			increaseAmount: 1,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxExplosionBig",
			name: "fxExplosionResidue",
			loop: true,
			fps: 3,
			alpha: 0.7
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.2,
			values: [0, 1],
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 2,
			scaleY: 2,
		}
	},
]};

var explosionResidueSmall = { components: [
	{
		c: SuspicionIncreaserComponent,
		d:{
			increaseAmount: 0.7,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxExplosionBig",
			name: "fxExplosionResidue",
			loop: true,
			fps: 3,
			alpha: 0.7
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.2,
			values: [0, 1],
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 0.7,
			scaleY: 0.7,
		}
	},
]};

var explosionShrapnelHugeSpawner = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["explosionShrapnelHuge"],
			spawnDirections: [0, 45, 90, 135, 180, 225, 270, 315],
			total: 8,
			initialImpulse: 800,
			spawnsPerRound: 8,
		//	spawnOrder: SpawnOrder.RANDOM
		}
	},
]};

var explosionShrapnelBigSpawner = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["explosionShrapnelBig"],
			spawnDirections: [0, 11.25, 22.5, 33.75, 45, 56.25, 67.5, 78.75, 90, 101.25, 112.5, 123.75, 135, 146.25, 157.5, 168.75, 180, 191.25, 202.5, 213.75, 225, 236.25, 247.5, 258.75, 270, 281.25, 292.5, 303.75, 315, 326.25, 337.5, 348.75],
			total: 5,
			initialImpulse: 500,
			spawnsPerRound: 5,
			spawnOrder: SpawnOrder.RANDOM
		}
	},
]};

var explosionShrapnelSmallSpawner = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["explosionShrapnelSmall"],
			spawnDirections: [0, 11.25, 22.5, 33.75, 45, 56.25, 67.5, 78.75, 90, 101.25, 112.5, 123.75, 135, 146.25, 157.5, 168.75, 180, 191.25, 202.5, 213.75, 225, 236.25, 247.5, 258.75, 270, 281.25, 292.5, 303.75, 315, 326.25, 337.5, 348.75],
			total: 32,
			initialImpulse: 600,
			constantForce: -200,
			spawnsPerRound: 32,
		}
	},
]};

var explosionFlash = { extend: lightMedium, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 2.5,
			scaleY: 2.5,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "SpriteComponent",
			field: "alpha",
			duration: 1,
			values: [1.0, 0],
		}
	},
]};

var screenFlashWhiteShort = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "lights",
			name: "lightTestMedium",
		//	tint: 0xff0000,
			alpha: 0.2,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.233333333333333
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 20,
			scaleY: 20,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 1/6,
			values: [0.2, 0],
			repeat: false
		}
	},
]};

var explosionCar = { components: [
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "boom",
		}
	},
/*	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxExplosionBig",
			name: "explosionBig",
			loop: false,
			fps: 30
		}
	},
*/
	{
		c: SpriterComponent,
		d: {
			spriterEntityName: "explosion",
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "spriterFX",
	//		defaultCharMaps: ["mouseA"]
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 1.5,
			scaleY: 1.5,
			rotation: Math.PI,

		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1.7
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["explosionResidue"],
			total: 1,
		}
	},
	{
		c: CameraShakerComponent,
		d: {
			duration: 0.8,
			magnitude: 0.15,
			useUnadjustedFrameTime: true,
		}
	},
	], children: [
	explosionShrapnelHugeSpawner,
	explosionShrapnelSmallSpawner,
	explosionShrapnelBigSpawner,
	screenFlashWhiteShort,
	explosionFlash,
]};

var watchShrapnelSpawner1 = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["watchShrapnelDMG"],
			spawnDirections: [0, 45, 90, 135, 180, 225, 270, 315],
			total: 8,
			initialImpulse: 300,
			spawnsPerRound: 8,
		//	spawnOrder: SpawnOrder.RANDOM
		}
	},
]};

var watchShrapnelSpawner2 = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["explosionShrapnelBig"],
			spawnDirections: [0, 11.25, 22.5, 33.75, 45, 56.25, 67.5, 78.75, 90, 101.25, 112.5, 123.75, 135, 146.25, 157.5, 168.75, 180, 191.25, 202.5, 213.75, 225, 236.25, 247.5, 258.75, 270, 281.25, 292.5, 303.75, 315, 326.25, 337.5, 348.75],
			total: 5,
			initialImpulse: 200,
			spawnsPerRound: 5,
			spawnOrder: SpawnOrder.RANDOM
		}
	},
]};

var watchShrapnelSpawner3 = { components: [
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["explosionShrapnelSmall"],
			spawnDirections: [0, 11.25, 22.5, 33.75, 45, 56.25, 67.5, 78.75, 90, 101.25, 112.5, 123.75, 135, 146.25, 157.5, 168.75, 180, 191.25, 202.5, 213.75, 225, 236.25, 247.5, 258.75, 270, 281.25, 292.5, 303.75, 315, 326.25, 337.5, 348.75],
			total: 32,
			initialImpulse: 200,
			constantForce: -200,
			spawnsPerRound: 32,
		}
	},
]};


var explosionSmall = { components: [
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "smallBoom",
		}
	},
	/*
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxExplosionBig",
			name: "explosionBig",
			loop: false,
			fps: 30
		}
	},
	*/
	{
		c: SpriterComponent,
		d: {
			spriterEntityName: "explosion",
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "spriterFX",
	//		defaultCharMaps: ["mouseA"]
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 0.8,
			scaleY: 0.8,
			rotation: Math.PI,

		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1.7
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["explosionResidueSmall"],
			total: 1,
		}
	},
	{
		c: CameraShakerComponent,
		d: {
			duration: 0.6,
			magnitude: 0.1,
			useUnadjustedFrameTime: true,
		}
	},
	], children: [
	watchShrapnelSpawner1,
	watchShrapnelSpawner2,
	watchShrapnelSpawner3,
	screenFlashWhiteShort,
	explosionFlash,
]};

var explosionPortal = { components: [
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "boom",
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "fxExplosionBig",
			name: "explosionBig",
			loop: false,
			fps: 30
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 2.5,
			scaleY: 2.5,
			rotation: Math.PI,

		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1.7
		}
	},
	], children: [
	explosionDamage,
]};

var fxPortal = { components: [
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "boom",
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxPortal",
			name: "portal",
			defaultAnimationName: "default",
			loop: true,
			fps: 30
		}
	},
	{
		c: TransformComponent,
		d: {
		}
	},
]};

var fxHellSmoke = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxHellSmoke",
			name: "hellSmoke",
			defaultAnimationName: "hellSmoke",
			loop: true,
			fps: 15,
			alpha: 0.2
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 28,
			scaleY: 28,
		}
	},
]};

var vhsStatic = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxVHS",
			name: "vhsStatic",
			defaultAnimationName: "default",
			loop: true,
			fps: 750,
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 5,
			scaleY: 5,
		}
	},
]};

var screenFlashRedMini = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "lights",
			name: "lightTestMedium",
			tint: 0xff0000,
			alpha: 0.2,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.233333333333333
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 40,
			scaleY: 40,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 1/6,
			values: [0.1, 0],
			repeat: false
		}
	},
]};

var screenFlashRedShort = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_IN_GAME_UI,
			sheet: "lights",
			name: "lightTestMedium",
			tint: 0xff0000,
			alpha: 0.2,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.233333333333333
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 20,
			scaleY: 20,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 1/6,
			values: [0.2, 0],
			repeat: false
		}
	},
]};

var bulletHitPersonAFlash = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "fxBlood2",
			name: "fxHitPersonD",
			defaultAnimationName: "default",
			loop: false,
			fps: 30,
			scale: 2
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.5
		}
	},
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "bulletHitBody",
		}
	},
], children: [
	screenFlashRedShort,
]};

var bulletHitPersonA = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "fxBlood",
			name: "fxHitPersonA",
			defaultAnimationName: "default",
			loop: false,
			fps: 30,
			scale: 2
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.5
		}
	},
	{
		c: TransformComponent,
		d: {
		}
	},
]};

var bulletHitPersonB = { extend: bulletHitPersonA, components: [
	{
		c: SpriteComponent,
		d: {
			name: "fxHitPersonB",
		}
	},
]};

var bulletHitPersonC = { extend: bulletHitPersonA, components: [
	{
		c: SpriteComponent,
		d: {
			name: "fxHitPersonC",
		}
	},
]};

var bulletHitPersonDSplash = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "fxBlood2",
			name: "fxHitPersonD",
			defaultAnimationName: "default",
			loop: false,
			fps: 30,
			scale: 2
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.5
		}
	},
	{
		c: TransformComponent,
		d: {
		}
	},
]};

var fxBloodmapA = { components: [
	//Add health component that only takes damage type Cleaning
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxBlood2",
			name: "fxBloodmapA",
			defaultAnimationName: "default",
			loop: false,
			fps: 15,
			scale: 2
		}
	},
	{
		c: SuspicionIncreaserComponent,
		d:{
			increaseAmount: 0.25,
		}
	},
	{
		c: TransformComponent,
		d: {
		}
	},
]};

var bulletHitPersonD = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxBlood2",
			name: "fxSplaterSmallA",
			defaultAnimationName: "default",
			loop: false,
			fps: 30,
			scale: 2
		}
	},
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "bulletHitBody",
		}
	},
], children: [
	bulletHitPersonDSplash,
]};

var bulletHitPersonSmallA = { extend: bulletHitPersonA, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 0.3,
			scaleY: 0.3,
		}
	},
]};

var bulletHitPersonSmallB = { extend: bulletHitPersonB, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 0.3,
			scaleY: 0.3,
		}
	},
]};

var bulletHitPersonSmallC = { extend: bulletHitPersonC, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 0.3,
			scaleY: 0.3,
		}
	},
]};

var bulletHitPersonSmallBFlash = { extend: bulletHitPersonB, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 0.3,
			scaleY: 0.3,
		}
	},
], children: [
	screenFlashRedMini,
]};

var bulletHitPersonSmallCFlash = { extend: bulletHitPersonC, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 0.3,
			scaleY: 0.3,
		}
	},
], children: [
	screenFlashRedMini,
]};

var bulletHitPaper = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "fxPaper",
			name: "fxHitPaperA",
			defaultAnimationName: "default",
			loop: false,
			fps: 30
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.4
		}
	},
]};

var flyingEmberSprite = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "fx",
			name: "bullet",
			defaultAnimationName: "idle",
			loop: false,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 1/3,
			values: [1, 0],
			repeat: false
		}
	},
	{
		c: TransformComponent,
		d: {
			scaleX: 5,
			scaleY: 5,
		}
	},
]};

var flyingEmber = { extend: lightMedium, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 0.1,
			scaleY: 0.1,
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			isBullet: true,
			density: 40,
			elasticity: 1,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 1,
			values: [1, 0],
			repeat: false
		}
	}
	{
		c: ColliderComponent,
		d: {
			radius: 0.1,
			collisionGroup: CollisionCategoryDefinitions.CC_LIGHT_DYNAMIC_OBSTACLE,
			collidesWith: [
			//	CollisionCategoryDefinitions.CC_CHARACTERS,
				CollisionCategoryDefinitions.CC_WALLS,
				CollisionCategoryDefinitions.CC_STATIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DYNAMIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DOORS,
			//	CollisionCategoryDefinitions.CC_LIGHT_DYNAMIC_OBSTACLE
			],
		}
	},
	{
		c: DistanceDestroyerComponent,
		d: {
			distance: 5,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1,
		}
	},
], children: [
	flyingEmberSprite
]};

var electricFlash = { extend: lightMedium, components: [
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 10/30,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 10/30,
			values: [1, 0],
			repeat: false
		}
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["flyingEmber"],
			spawnDirections: [11.25, 157.5, 292.5],
			total: 3,
			initialImpulse: 100,
			constantForce: 5,
			spawnsPerRound: 3,
		}
	},
]};

var fxHitElectric = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxElectric",
			name: "fxHitElectricA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 30,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1
		}
	},
	{
		c: TransformComponent,
		d: {
			zIndex: 100,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "bulletHitCar",
		}
	},
], children: [
	electricFlash
]};

var fxBump = { components: [
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1
		}
	},
	{
		c: TransformComponent,
		d: {
			zIndex: 100,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "pickupBox",
		}
	},
]};

var fxOpenSafe = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxElectric",
			name: "fxHitElectricA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 30,
			zIndex: 100
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "unlock",
		}
	},
	{
		c: TransformComponent,
		d: {
		}
	},
], children: [
	electricFlash
]};

var fxHitCar = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxElectric",
			name: "fxHitElectricA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 30,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1
		}
	},
	{
		c: TransformComponent,
		d: {
			zIndex: 100,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "bulletHitCar",
		}
	},
//], children: [
//	electricFlash
]};

var fxDrillDamage = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxElectric",
			name: "fxHitElectricA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 30,
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1
		}
	},
	{
		c: TransformComponent,
		d: {
			zIndex: 100,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "drillHitMetal",
		}
	},
//], children: [
//	electricFlash
]};

var fxMiss = { components: [
	/*
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxElectric",
			name: "fxHitElectricA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 30,
		}
	},
	*/
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 2
		}
	},
	{
		c: TransformComponent,
		d: {
			zIndex: 100,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "bulletMiss",
		}
	},
//], children: [
//	electricFlash
]};

var fxBulletHitWood = { components: [
	/*
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxElectric",
			name: "fxHitElectricA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 30,
		}
	},
	*/
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 2
		}
	},
	{
		c: TransformComponent,
		d: {
			zIndex: 100,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "bulletHitWood",
		}
	},
]};

var fireGlow = { extend: lightMedium, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 2,
			scaleY: 2,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 1/4,
			values: [0.9, 1, 0.9],
			repeat: true
		}
	},
	{
		c: SpriteComponent,
		d: {
			tint: 0x800000
		}
	}
]};

var fxHitWindowA = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxWindowA",
			name: "fxHitWindowA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 60,
			tint: 0x242424,
		}
	},
	{
		c: SuspicionIncreaserComponent,
		d:{
			increaseAmount: 0.25,
		}
	},
/*	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.9
		}
	},
*/
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: AIWaypointComponent,
		d: {
			cost: 5,
			dynamicCost: ActionDefinitions.doNotAllowForNonUserCommanded
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "breakGlass",
		}
	},
]};

var fxBreakWall = { extend: fxHitWindowA, components: [
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "bulletHitCar",
		}
	},
]};

var fxBrokenWindow = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxWindowA",
			name: "fxHitWindowA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 60,
			tint: 0x242424,
		}
	},
	{
		c: TransformComponent,
		d: {
		}
	},
]};

var fxHitWindowADirectionalTop = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OBJECTS,
			sheet: "fxWindowA",
			name: "fxHitWindowADirectional",
			defaultAnimationName: "idle",
			loop: false,
			fps: 60
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.3,
			values: [1, 0],
			repeat: false
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.4
		}
	},
]};

var fxHitWindowADirectional = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxWindowA",
			name: "fxHitWindowADirectional",
			defaultAnimationName: "idle",
			loop: false,
			fps: 60
		}
	},
/*	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.9
		}
	},
*/
	{
		c: TransformComponent,
		d: {
		}
	},
], children: [
	fxHitWindowADirectionalTop,
]};

var fxDestroyedWall = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxWindowA",
			name: "fxHitWindowA",
			defaultAnimationName: "idle",
			loop: false,
			fps: 60
		}
	},
	{
		c: SuspicionIncreaserComponent,
		d:{
			increaseAmount: 0.5,
		}
	},
/*	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.9
		}
	},
*/
	{
		c: TransformComponent,
		d: {
		}
	},
	{
		c: AIWaypointComponent,
		d: {
			cost: 5,
			dynamicCost: ActionDefinitions.doNotAllowForNonUserCommanded
		}
	},
/*	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "breakGlass",
		}
	},
*/
]};

var fxWoodenCrateATop = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxWood",
			name: "fxWoodenCrateA",
			defaultAnimationName: "default",
			fps: 30,
			loop: false,
			//tint: 0xffec9f,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.25,
			values: [1, 0],
			repeat: false
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.4
		}
	},
]};

var fxWoodenCrateNoNode = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxWood",
			name: "fxWoodenCrateA",
			defaultAnimationName: "default",
			fps: 30,
			loop: false,
			//tint: 0xffec9f,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "breakWood",
		}
	},
], children: [
	fxWoodenCrateATop,
]};

var fxWoodenCrateA = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxWood",
			name: "fxWoodenCrateA",
			defaultAnimationName: "default",
			fps: 30,
			loop: false,
			//tint: 0xffec9f,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "breakWood",
		}
	},
	{
		c: AIWaypointComponent,
		d: {
			cost: 1,
		}
	},
], children: [
	fxWoodenCrateATop,
]};

var fxWoodenDoorATop = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxWood",
			name: "fxWoodenCrateA",
			defaultAnimationName: "default",
			fps: 30,
			loop: false,
			tint: 0x565d63,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.25,
			values: [1, 0],
			repeat: false
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.4
		}
	},
]};

var fxWoodenDoorA = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxWood",
			name: "fxWoodenCrateA",
			defaultAnimationName: "default",
			fps: 30,
			loop: false,
			tint: 0x565d63,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "breakWood",
		}
	},
], children: [
	fxWoodenDoorATop,
]};

var fxGlassFlatATop = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "fxGlassFlat",
			name: "fxGlassFlatA",
			defaultAnimationName: "default",
			fps: 30,
			loop: false,
			//tint: 0xffec9f,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "SpriteComponent",
			field: "alpha",
			duration: 0.5,
			values: [1, 0],
			repeat: false
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 0.4
		}
	},
]};

var fxGlassFlatA = { components: [
	{
		c: TransformComponent
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "fxGlassFlat",
			name: "fxGlassFlatA",
			defaultAnimationName: "default",
			fps: 30,
			loop: false,
			//tint: 0xffec9f,
		}
	},
	{
		c: SuspicionIncreaserComponent,
		d:{
			increaseAmount: 0.5,
		}
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "breakGlass",
		}
	},
], children: [
	fxGlassFlatATop,
]};

var buzzEffect = { components: [
	{
		c: TransformComponent,
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "buzz",
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1.0
		}
	},
]};

var electricSwitchOnEffect = { components: [
	{
		c: TransformComponent,
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "electricSwitchOn",
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1.0
		}
	},
]};

var electricSwitchOffEffect = { components: [
	{
		c: TransformComponent,
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "electricSwitchOff",
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 1.0
		}
	},
]};

var zombieIdleSFX = { components: [
	{
		c: TransformComponent,
	},
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "zombieIdling",
		}
	},
	{
		c: TimerDestroyerComponent,
		d: {
			lifetime: 2.0
		}
	},
]};

//START ZOMBIESMOKE

var fxZombieSmokeRising1 = { components: [
		{
			c: TransformComponent,
		},
		{
			c: TimerDestroyerComponent,
			d: {
				lifetime: 4.0
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "TransformComponent",
				field: "simpleLocalScale",
				duration: 2,
				values: [0.5, 2],
				easing: EasingFunctions.linear
			}
		},
	], children: [
	{ components: [
		{
			c: TransformComponent,
			d: {
				zIndex: 1,
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "TransformComponent",
				field: "localRotation",
				duration: 5,
				values: [0 , -Math.PI],
				easing: EasingFunctions.linear
			}
		},
		], children: [
		{ components: [
			{
				c: TransformComponent,
				d: {
					zIndex: 1,
				}
			},
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_OVERHEAD,
					sheet: "fxSmoke",
					name: "fxSmokeCloud",
					loop: false,
					tint: 0x6bd62d,
					alpha: 0,
				}
			},
			{
				c: TweenerComponent,
				d: {
					component: "SpriteComponent",
					field: "alpha",
					duration: 0.7,
					values: [0, 1, 0.7, 0],
					repeat: false
				}
			},
		]},
	]}
]};

var fxZombieSmokeRising2 = { components: [
		{
			c: TransformComponent,
		},
		{
			c: TimerDestroyerComponent,
			d: {
				lifetime: 4.0
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "TransformComponent",
				field: "simpleLocalScale",
				duration: 3,
				values: [0.4, 2],
				easing: EasingFunctions.linear
			}
		},
			{
		c: DamageComponent,
		d: {
			amount: 0.1,
			type: DamageType.fire,
		}
	},
	{
		c: ColliderComponent,
		d: {
			radius: 0.5,
			collisionGroup: CollisionCategoryDefinitions.CC_BULLETS,
			senses: [
				CollisionCategoryDefinitions.CC_CHARACTERS,
				CollisionCategoryDefinitions.CC_WALLS,
				CollisionCategoryDefinitions.CC_STATIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DYNAMIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DOORS,
				CollisionCategoryDefinitions.CC_LIGHT_DYNAMIC_OBSTACLE
			],
			collidesWith: [
				CollisionCategoryDefinitions.CC_CHARACTERS,
				CollisionCategoryDefinitions.CC_WALLS,
				CollisionCategoryDefinitions.CC_STATIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DYNAMIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DOORS,
				CollisionCategoryDefinitions.CC_LIGHT_DYNAMIC_OBSTACLE
			]
		}
	},
	{
		c: RigidBodyComponent,
		d: {
			isDynamic: false,
			isSensor: true,
		}
	},
	], children: [
	{ components: [
		{
			c: TransformComponent,
			d: {
				zIndex: 1,
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "TransformComponent",
				field: "localRotation",
				duration: 5,
				values: [0 , Math.PI],
				easing: EasingFunctions.linear
			}
		},
		], children: [
		{ components: [
			{
				c: TransformComponent,
				d: {
					zIndex: 1,
				}
			},
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_OVERHEAD,
					sheet: "fxSmoke",
					name: "fxSmokeCloud",
					loop: false,
					tint: 0x6bd62d,
					alpha: 0,
				}
			},
			{
				c: TweenerComponent,
				d: {
					component: "SpriteComponent",
					field: "alpha",
					duration: 0.7,
					values: [0, 1, 0.7, 0],
					repeat: false
				}
			},
		]},
	]}
]};

var fxZombieSmokeSpawner = { components: [
	{
		c: TransformComponent,
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["fxZombieSmokeRising1", "fxZombieSmokeRising2"],
			//spawnOnFirstFrame: false,
			//maxInWorld: 5,
			total: -1,
			//timeLeft: 0.01,
			minInterval: 0.3,
			maxInterval: 0.6,
		//	spawnOrder: RANDOM,
		}
	},
]};

//END ZOMBIESMOKE

//START SEWER SMOKE
var fxSewerSmokeRising1 = { components: [
		{
			c: TransformComponent,
		},
		{
			c: TimerDestroyerComponent,
			d: {
				lifetime: 8.0
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "TransformComponent",
				field: "simpleLocalScale",
				duration: 6,
				values: [0.15, 1],
				easing: EasingFunctions.linear
			}
		},
	{
		c: RigidBodyComponent,
		d: {
		//	isBullet: true,
			density: 0.001,
		//	elasticity: 1,
		}
	},
	{
		c: ColliderComponent,
		d: {
			radius: 0.06,
			collisionGroup: CollisionCategoryDefinitions.CC_LIGHT_DYNAMIC_OBSTACLE,
			collidesWith: [
				CollisionCategoryDefinitions.CC_WALLS,
				CollisionCategoryDefinitions.CC_STATIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DYNAMIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DOORS,
			//	CollisionCategoryDefinitions.CC_CHARACTERS,

			],
		}
	},
	], children: [
	{ components: [
		{
			c: TransformComponent,
			d: {
				zIndex: 1,
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "TransformComponent",
				field: "localRotation",
				duration: 10,
				values: [0 , -Math.PI],
				easing: EasingFunctions.linear
			}
		},
		], children: [
		{ components: [
			{
				c: TransformComponent,
				d: {
					zIndex: 1,
				}
			},
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_OVERHEAD,
					sheet: "fxSmoke",
					name: "fxSmokeCloud",
					loop: false,
				//	tint: 0x6bd62d,
					alpha: 0,
				}
			},
			{
				c: TweenerComponent,
				d: {
					component: "SpriteComponent",
					field: "alpha",
					duration: 1.4,
					values: [0, 0.8, 0.65, 0.5, 0.25, 0],
					repeat: false
				}
			},
		]},
	]}
]};

var fxSewerSmokeRising2 = { components: [
		{
			c: TransformComponent,
		},
		{
			c: TimerDestroyerComponent,
			d: {
				lifetime: 8.0
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "TransformComponent",
				field: "simpleLocalScale",
				duration: 8,
				values: [0.1, 1],
				easing: EasingFunctions.linear
			}
		},
		{
		c: RigidBodyComponent,
		d: {
		//	isBullet: true,
			density: 0.001,
		//	elasticity: 1,
		}
	},
	{
		c: ColliderComponent,
		d: {
			radius: 0.06,
			collisionGroup: CollisionCategoryDefinitions.CC_LIGHT_DYNAMIC_OBSTACLE,
			collidesWith: [
				CollisionCategoryDefinitions.CC_WALLS,
				CollisionCategoryDefinitions.CC_STATIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DYNAMIC_OBSTACLE,
				CollisionCategoryDefinitions.CC_DOORS,
				CollisionCategoryDefinitions.CC_CHARACTERS,
			],
		}
	},
	], children: [
	{ components: [
		{
			c: TransformComponent,
			d: {
				zIndex: 1,
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "TransformComponent",
				field: "localRotation",
				duration: 15,
				values: [0 , Math.PI],
				easing: EasingFunctions.linear
			}
		},
		], children: [
		{ components: [
			{
				c: TransformComponent,
				d: {
					zIndex: 1,
				}
			},
			{
				c: SpriteComponent,
				d: {
					layer: LayerDefinitions.LAYER_OVERHEAD,
					sheet: "fxSmoke",
					name: "fxSmokeCloud",
					loop: false,
				//	tint: 0x6bd62d,
					alpha: 0,
				}
			},
			{
				c: TweenerComponent,
				d: {
					component: "SpriteComponent",
					field: "alpha",
					duration: 2.8,
					values: [0, 0.8, 0.6, 0],
					repeat: false
				}
			},
		]},
	]}
]};

var fxSewerSmokeSpawner = { components: [
	{
		c: TransformComponent,
	},
	{
		c: SpawnerComponent,
		d: {
			entityDefinitions: ["fxSewerSmokeRising1", "fxSewerSmokeRising2"],
			spawnDirections: [56.25, 67.5],
			//spawnOnFirstFrame: false,
			//maxInWorld: 5,
			total: -1,
			//timeLeft: 0.01,
			minInterval: 0.5,
			maxInterval: 0.75,
			spawnOrder: SpawnOrder.RANDOM,
		//	initialImpulse: 0.0001,
			constantForce: 0.0002,
		}
	},
]};
//END SEWER SMOKE

var inactiveBodyA = { components: [
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "civilianC",
			name: "civilianC",
			defaultAnimationName: "dead",
		}
	},
]};

//EMBERS
var embers = { components: [
	{
		c: TransformComponent,
		d: {
				scaleX: 0.5,
				scaleY: 0.5,
		},
	},
	], children: [
	{ components: [
		{
			c: TransformComponent,
			d: {
			},
		},
		{
			c: SpriteComponent,
			d: {
				layer: LayerDefinitions.LAYER_FLOOR_OBJECTS,
				sheet: "fx",
				name: "fxEmber",
				defaultAnimationName: "a",
				loop: false,
				fps: 30
			}
		},
		{
				c: TweenerComponent,
				d: {
					component: "SpriteComponent",
					field: "alpha",
					duration: 2/4,
					values: [0.1, 0.5, 0.1],
					repeat: true
				//	easing: EasingFunctions.linear
				}
		},
	]},
	{ components: [
		{
			c: TransformComponent,
			d: {
			},
		},
		{
			c: SpriteComponent,
			d: {
				layer: LayerDefinitions.LAYER_FLOOR_OBJECTS,
				sheet: "fx",
				name: "fxEmber",
				defaultAnimationName: "b",
				loop: false,
				fps: 30
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "SpriteComponent",
				field: "alpha",
				duration: 2/5,
				values: [0.1, 0.5, 0.1],
				repeat: true
			//	easing: EasingFunctions.linear
			}
		},
	]},
	{ components: [
		{
			c: TransformComponent,
			d: {
			},
		},
		{
			c: SpriteComponent,
			d: {
				layer: LayerDefinitions.LAYER_FLOOR_OBJECTS,
				sheet: "fx",
				name: "fxEmber",
				defaultAnimationName: "c",
				loop: false,
				fps: 30
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "SpriteComponent",
				field: "alpha",
				duration: 2/6,
				values: [0.1, 0.5, 0.1],
				repeat: true
			//	easing: EasingFunctions.linear
			}
		},
	]},
	{ components: [
		{
			c: TransformComponent,
			d: {
			},
		},
		{
			c: SpriteComponent,
			d: {
				layer: LayerDefinitions.LAYER_LIGHTING,
				sheet: "fx",
				name: "fxEmber",
				defaultAnimationName: "a",
				loop: false,
				fps: 30
			}
		},
		{
				c: TweenerComponent,
				d: {
					component: "SpriteComponent",
					field: "alpha",
					duration: 2/4,
					values: [0.1, 0.5, 0.1],
					repeat: true
				//	easing: EasingFunctions.linear
				}
		},
	]},
	{ components: [
		{
			c: TransformComponent,
			d: {
			},
		},
		{
			c: SpriteComponent,
			d: {
				layer: LayerDefinitions.LAYER_LIGHTING,
				sheet: "fx",
				name: "fxEmber",
				defaultAnimationName: "b",
				loop: false,
				fps: 30
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "SpriteComponent",
				field: "alpha",
				duration: 2/5,
				values: [0.1, 0.5, 0.1],
				repeat: true
			//	easing: EasingFunctions.linear
			}
		},
	]},
	{ components: [
		{
			c: TransformComponent,
			d: {
			},
		},
		{
			c: SpriteComponent,
			d: {
				layer: LayerDefinitions.LAYER_LIGHTING,
				sheet: "fx",
				name: "fxEmber",
				defaultAnimationName: "c",
				loop: false,
				fps: 30
			}
		},
		{
			c: TweenerComponent,
			d: {
				component: "SpriteComponent",
				field: "alpha",
				duration: 2/6,
				values: [0.1, 0.5, 0.1],
				repeat: true
			//	easing: EasingFunctions.linear
			}
		},
	]},
]};

var waterBase = { components: [
	/*
	{
		c: AudioSourceComponent,
		d: {
			autoPlay: "boom",
		}
	},
	*/
	{
		c: TransformComponent,
		d: {
			scaleX: 2,
			scaleY: 2,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_BG,
			sheet: "tilesWater",
			name: "waterBase",
			alpha: 0.7,
		}
	},
]};

//MAPLETREE

var mapleBranch1black = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			rotation: 2 * Math.PI * 1 / 3,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "foliage",
			name: "mapleBranch",
			tint: 0x000000,
		//	alpha: 0.5,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "TransformComponent",
			field: "localRotation",
			duration: 2.5,
			values: [2 * Math.PI * 1 / 3 , 2 * Math.PI * 1 / 3 + 0.01, 2 * Math.PI * 1 / 3],
			easing: EasingFunctions.easeInOut,
			repeat: true,
		}
	},
]};

var mapleBranch2black = { extend: mapleBranch1black, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			rotation: 2 * Math.PI * 2 / 3,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 3,
			values: [2 * Math.PI * 2 / 3 , 2 * Math.PI * 2 / 3 + 0.01, 2 * Math.PI * 2 / 3],
		}
	},
]};

var mapleBranch3black = { extend: mapleBranch1black, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			rotation: 2 * Math.PI * 3 / 3,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 3.5,
			values: [2 * Math.PI, 2 * Math.PI + 0.01, 2 * Math.PI],
		}
	},
]};

var mapleBranch1 = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			rotation: 2 * Math.PI * 1 / 3,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "foliage",
			name: "mapleBranch",
		//	alpha: 0.5,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "TransformComponent",
			field: "localRotation",
			duration: 2.5,
			values: [2 * Math.PI * 1 / 3 , 2 * Math.PI * 1 / 3 + 0.01, 2 * Math.PI * 1 / 3],
			easing: EasingFunctions.easeInOut,
			repeat: true,
		}
	},
]};

var mapleBranch2 = { extend: mapleBranch1, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			rotation: 2 * Math.PI * 2 / 3,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 3,
			values: [2 * Math.PI * 2 / 3 , 2 * Math.PI * 2 / 3 + 0.01, 2 * Math.PI * 2 / 3],
		}
	},
]};

var mapleBranch3 = { extend: mapleBranch1, components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
			rotation: 2 * Math.PI * 3 / 3,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 3.5,
			values: [2 * Math.PI, 2 * Math.PI + 0.01, 2 * Math.PI],
		}
	},
]};

var mapleBranchSet1 = { components: [
	{
		c: TransformComponent,
		d: {
			y: -1 / 128,
			scaleX: 1,
			scaleY: 1,
			rotation: 2 * Math.PI / 1,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 2,
			values: [{ x: 0, y: -1 / 128 }, { x: 1/128, y: -1 / 128 }, { x: 0, y: -1 / 128 }],
			easing: EasingFunctions.easeInOut,
			repeat: true
		}
	},
	], children: [
	mapleBranch1,
	mapleBranch2,
	mapleBranch3,
]};

var mapleBranchSet2 = { components: [
	{
		c: TransformComponent,
		d: {
			y: -2 / 128,
			scaleX: 1.2,
			scaleY: 1.2,
			rotation: 2 * Math.PI / 2,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 3,
			values: [{ x: 0, y: -2 / 128 }, { x: 1/128, y: -2 / 128 }, { x: 0, y: -2 / 128 }],
			easing: EasingFunctions.easeInOut,
			repeat: true
		}
	},
	], children: [
	mapleBranch1,
	mapleBranch2,
	mapleBranch3,
]};

var mapleBranchSet3 = { components: [
	{
		c: TransformComponent,
		d: {
			y: -3 / 128,
			scaleX: 1.4,
			scaleY: 1.4,
			rotation: 2 * Math.PI / 3,
		}
	},
	{
		c: TweenerComponent,
		d: {
			enabled: true,
			component: "TransformComponent",
			field: "localPosition",
			duration: 4,
			values: [{ x: 0, y: -3 / 128 }, { x: 1/128, y: -3 / 128 }, { x: 0, y: -3 / 128 }],
			easing: EasingFunctions.easeInOut,
			repeat: true
		}
	},
	], children: [
	mapleBranch1,
	mapleBranch2,
	mapleBranch3,
]};

var mapleBranchSetBlack = { components: [
	{
		c: TransformComponent,
		d: {
			y: -20 / 128,
			x: 20/ 128,
			scaleX: 1.5,
			scaleY: 1.5,
			rotation: 2 * Math.PI / 3,
		}
	},
	], children: [
	mapleBranch1black,
	mapleBranch2black,
	mapleBranch3black,
]};

var mapleTree = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_FLOOR,
			sheet: "foliage",
			name: "mapleBranch",
			tint: 0x000000,
			alpha: 0,
		}
	},
	], children: [
	mapleBranchSet1,
	mapleBranchSet2,
	mapleBranchSet3,
	mapleBranchSetBlack,
]};

var palmBranch1 = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
		//	rotation: 2 * Math.PI * 1 / 3,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "foliage",
			name: "palmBranch",
		//	alpha: 0.5,
		}
	},
	{
		c: TweenerComponent,
		d: {
			component: "TransformComponent",
			field: "localRotation",
			duration: 2.5,
			values: [0 ,0 + 0.01, 0],
			easing: EasingFunctions.easeInOut,
			repeat: true,
		}
	},
]};

var palmBranch2 = { extend: palmBranch1, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 1.396,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 3,
			values: [1.396 ,1.396 + 0.01, 1.396],
		}
	},
]};

var palmBranch3 = { extend: palmBranch1, components: [
	{
		c: TransformComponent,
		d: {
			rotation: 3.076,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 3.5,
			values: [3.076 ,3.076 + 0.01, 3.076],
		}
	},
]};

var palmBranch4 = { extend: palmBranch1, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -1.919,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 3.8,
			values: [-1.919 ,-1.919 + 0.01, -1.919],
		}
	},
]};

var palmBranch5 = { extend: palmBranch1, components: [
	{
		c: TransformComponent,
		d: {
			rotation: -1.103,
		}
	},
	{
		c: TweenerComponent,
		d: {
			duration: 1.5,
			values: [-1.103 ,-1.103 + 0.01, -1.103],
		}
	},
]};

var palmTree = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1.5,
			scaleY: 1.5,
		}
	},
	], children: [
	palmBranch1,
	palmBranch2,
	palmBranch3,
	palmBranch4,
	palmBranch5,
]};

var testTile = { components: [
	{
		c: TransformComponent,
		d: {
			scaleX: 1,
			scaleY: 1,
		}
	},
	{
		c: SpriteComponent,
		d: {
			layer: LayerDefinitions.LAYER_OVERHEAD,
			sheet: "tileset_courtyard",
			name: "7",
			tint: 0x000000,
		//	alpha: 0.5,
		}
	},
]};