class 'l_10_Dead_ship_shore_Z_Boat' (ZoomZone)

function l_10_Dead_ship_shore_Z_Boat:__init(name, mode, PlayField)
	ZoomZone.__init(self, name, mode, PlayField)
	
		local tool_glue_stick 	= '10_glue_stick'
	local tool_moss 		= '11_moss'
	local tool_board 		= '12_board'
	local tool_oilcan 		= '15_oilcan'
	local tool_chain 		= '10_chain_part_2'
	local tool_lever		= '11_lever'
	local isReadyMove		= false

	-- apply_glue_stick -------------------------------------------------------------
	do  
		local function on_apply_glue_stick(e)
			self:entityHide(e.target)
			self:entityShow('area_apply_board')
			if e.save then
				self:entityShow('zb_glue_1', 'zb_glue_2')
			else
				self:entityFadeShow('zb_glue_1', 'zb_glue_2')
			end
		end
		self:registerToolApplyInfo(tool_glue_stick, 'area_apply_glue_stick', on_apply_glue_stick, 'BBT_10_NEED_GLUE_STICK')
	end
	---------------------------------------------------------------------------------

	-- apply_board ------------------------------------------------------------------
	do 
		local function on_apply_board(e)
			self:entityHide(e.target)
			self:entityShow('area_apply_moss')
			if e.save then
				self:entityShow('zb_board_1', 'zb_board_2')
				self:entityHide('zb_light')
			else
				self:entityFadeShow('zb_board_1', 'zb_board_2')
				self:entityFadeHide('zb_light')
			end
		end
		self:registerToolApplyInfo(tool_board, 'area_apply_board', on_apply_board, 'BBT_10_NEED_BOARD')
	end
	------------------------------------------------------------------------

	-- apply_moss ----------------------------------------------------------
	do 	
		local function on_apply_moss(e)
			self:entityHide(e.target)
			self:entityShow('area_apply_zb_lever')
			if e.save then
				self:entityShow('zb_moss_1', 'zb_moss_2')
			else
				self:entityFadeShow('zb_moss_1', 'zb_moss_2')
			end
		end
		self:registerToolApplyInfo(tool_moss, 'area_apply_moss', on_apply_moss, 'BBT_10_NEED_MOSS')
	end
	------------------------------------------------------------------------

	-- apply_oilcan --------------------------------------------------------
	do 	
		local function on_apply_oilcan(e)
			self:entityHide(e.target)
			self:entityShow('area_find_chain')
			if e.save then
				self:entityHide('zb_rust')
			else
				self:entityFadeHide('zb_rust')
			end
		end
		self:registerToolApplyInfo(tool_oilcan, 'area_apply_oilcan', on_apply_oilcan, 'BBT_10_NEED_OILCAN')
	end
	------------------------------------------------------------------------

	-- apply_zb_lever ------------------------------------------------------
	do 	
		local function on_apply_zb_lever(e)
			self:entityHide(e.target)
			self:entityShow('area_click_zb_lever')
			if e.save then
				self:entityShow('zb_lever')
			else
				self:entityFadeShow('zb_lever')
			end
		end
		self:registerToolApplyInfo(tool_lever, 'area_apply_zb_lever', on_apply_zb_lever, 'BBT_10_NEED_LEVER')
	end
	------------------------------------------------------------------------

	-- click_zb_lever ------------------------------------------------------
	do 	
		local function on_click_zb_lever(e)
			self:entityHide(e.target)
			self.playfield:entityShow('area_link_15')
			if e.save then
				self:entityHide('zb_lever')
				self:getEntityNamed('zb_boat'):setXY(389, 311)

				if IsToolFound(tool_chain) then
					self:closeAndDisable()
				end 
			else
				self:entityFadeHide('zb_lever')
				self:getEntityNamed('zb_boat'):MoveTo(389, 311, 1)

				if IsToolFound(tool_chain) then
					self.timer:add( function ()
										self:closeAndDisable()
									end, 1.5)
				end 
			end
		end
		self:registerActiveObject('area_click_zb_lever', on_click_zb_lever)
	end
	----------------------------------------------------------------------

	-- find_chain --------------------------------------------------------
	do 	
		local function on_find_chain(e)
			self:entityHide(e.target)
			if e.save then
				self:entityHide('zb_chain')

				if self:isObjectClicked('area_click_zb_lever') then
					self:closeAndDisable()
				end 
			else
				self:entityFadeHide('zb_chain')

				if self:isObjectClicked('area_click_zb_lever') then
					self:closeAndDisable()
				end 
			end
		end
		self:registerToolFindInfo(tool_chain, 'area_find_chain', on_find_chain)
	end 	
	-----------------------------------------------------------------------
end

--------------------------------------------------------------------------------
--                      GENERATED CONTENT. DO NOT EDIT.                       --
--------------------------------------------------------------------------------

function l_10_Dead_ship_shore_Z_Boat:CreateLoaderTable()
	local objects =
	{
		{ name = 'zb_bg',  entityType = 'SpriteEntity',  x = 512,  y = 384,  order = 0,  editingLocked = true,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_bg.jpg',  width = 640,  height = 480,  },
		{ name = 'zb_lever',  entityType = 'SpriteEntity',  x = 739,  y = 428,  order = 20,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_lever.png',  width = 106,  height = 392,  },
		{ name = 'area_apply_glue_stick',  entityType = 'SpriteEntity',  x = 579,  y = 360,  order = 30,  angle = -15,  scaleX = 40,  scaleY = 15,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = true,  treeItemIsExpanded = true,  width = 10,  height = 10,  },
		{ name = 'area_apply_board',  entityType = 'SpriteEntity',  x = 579,  y = 360,  order = 28,  isVisible = false,  isRespondable = false,  isActive = false,  angle = -15,  scaleX = 40,  scaleY = 15,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = true,  treeItemIsExpanded = false,  width = 10,  height = 10,  },
		{ name = 'area_apply_moss',  entityType = 'SpriteEntity',  x = 579,  y = 360,  order = 25,  isVisible = false,  isRespondable = false,  isActive = false,  angle = -15,  scaleX = 40,  scaleY = 15,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = true,  treeItemIsExpanded = false,  width = 10,  height = 10,  },
		{ name = 'area_click_zb_lever',  entityType = 'SpriteEntity',  x = 734,  y = 425,  order = 30,  isVisible = false,  isRespondable = false,  isActive = false,  scaleX = 15,  scaleY = 40,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = true,  treeItemIsExpanded = true,  width = 10,  height = 10,  },
		{ name = 'area_apply_zb_lever',  entityType = 'SpriteEntity',  x = 730,  y = 534,  order = 30,  isVisible = false,  isRespondable = false,  isActive = false,  scaleX = 15,  scaleY = 18,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = true,  treeItemIsExpanded = true,  width = 10,  height = 10,  },
		{ name = 'zb_boat',  entityType = 'SpriteEntity',  x = 622,  y = 445,  order = 5,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_boat.png',  width = 857,  height = 601,  },
		{ name = 'zb_glue_1',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = -140,  y = -44,  order = 5,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_glue_1.png',  width = 184,  height = 78,  },
		{ name = 'zb_board_1',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = -150,  y = -44,  order = 10,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_board_1.png',  width = 184,  height = 68,  },
		{ name = 'zb_moss_1',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = -140,  y = -44,  order = 15,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_moss_1.png',  width = 168,  height = 72,  },
		{ name = 'zb_glue_2',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = 80,  y = -128,  order = 5,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_glue_2.png',  width = 192,  height = 114,  },
		{ name = 'zb_board_2',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = 80,  y = -116,  order = 10,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_board_2.png',  width = 172,  height = 110,  },
		{ name = 'zb_moss_2',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = 76.094,  y = -119.562,  order = 15,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_moss_2.png',  width = 166,  height = 106,  },
		{ name = 'zb_light',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = -10,  y = -60,  order = 0,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_light.png',  width = 318,  height = 236,  },
		{ name = 'area_apply_oilcan',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = 116,  y = -2.00003,  order = 30,  angle = -21,  scaleX = 22,  scaleY = 10,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = true,  treeItemIsExpanded = true,  width = 10,  height = 10,  },
		{ name = 'area_find_chain',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = 116,  y = -2.00003,  order = 28,  isVisible = false,  isRespondable = false,  isActive = false,  angle = -21,  scaleX = 22,  scaleY = 10,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = true,  treeItemIsExpanded = true,  width = 10,  height = 10,  },
		{ name = 'zb_chain',  entityType = 'SpriteEntity',  parentName = 'zb_boat',  x = 118,  y = 2,  order = 10,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_chain.png',  width = 184,  height = 90,  },
		{ name = 'zb_rust',  entityType = 'SpriteEntity',  parentName = 'zb_chain',  x = 0,  y = 0,  order = 0,  isRespondable = false,  editingLocked = true,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/10_Dead_ship_shore/Z_Boat/zb_rust.png',  width = 186,  height = 104,  },
	}
	return objects
end
