class 'l_08_Lauras_room_Z_Hipo' (ZoomZone)

function l_08_Lauras_room_Z_Hipo:__init(name, mode, PlayField)
	ZoomZone.__init(self, name, mode, PlayField)

	-- some thing ---------------------------------------------------------
	do
		local function on_something(event)
			self:closeAndDisable()
		end		
	end
	-----------------------------------------------------------------------
	--hide
	self:entityHide('zh_eye','zh_bg_2','zh_hair_comb','area_find_hair_comb')

		--apply eye

	local function on_applied_green_eye(event)		
  		self:entityHide(event.target)

  	    if not event.save then
  	  	--  self.playfield:entityShow('')
  	  	self:playSound('08_apply_green_eye')
  	    self:entityFadeShow('zh_eye')
  		--self:entityShow('zh_eye')
  	    	self.timer:add( function() 
  							 self:entityFadeShow('zh_bg_2','zh_hair_comb','area_find_hair_comb')
  							 self:entityHide('zh_eye')
  							 self.playfield:entityFadeHide('zt_hipo_close','hipo_close')
  	    					 end, 0.5)
 		else
 			 self.playfield:entityHide('zt_hipo_close','hipo_close')
			 self:entityFadeShow('zh_bg_2')
			 self:entityShow('zh_hair_comb','area_find_hair_comb')
  	    end	
  	 	
  	end
    self:registerToolApplyInfo('09_green_eye', 'area_apply_green_eye', on_applied_green_eye, 'BBT_NEED_09_GREEN_EYE')

    local function on_find_hair_comb(event)
      	self:closeAndDisable()
      	if HasGameState('08_FlyNote_Diary_founded', 'true') then
      		self.playfield.zoom_table_pillow:closeAndDisable()
      	end
    end
	self:registerToolFindInfo('08_hair_comb', 'area_find_hair_comb', on_find_hair_comb)

end

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

function l_08_Lauras_room_Z_Hipo:CreateLoaderTable()
	local objects =
	{
		{ name = 'zh_bg',  entityType = 'SpriteEntity',  x = 512,  y = 384,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Scenes/08_Lauras_room/Z_Hipo/zh_bg.png',  width = 300,  height = 300,  },
		{ name = 'zh_eye',  entityType = 'SpriteEntity',  x = 454,  y = 346,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  hotSpot = {x = 15, y = 17},  texturePath = 'Data/Textures/Scenes/08_Lauras_room/Z_Hipo/zh_eye.png',  width = 26,  height = 29,  },
		{ name = 'zh_bg_2',  entityType = 'SpriteEntity',  x = 512,  y = 384,  order = 5,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Scenes/08_Lauras_room/Z_Hipo/zh_bg_2.png',  width = 300,  height = 300,  },
		{ name = 'zh_hair_comb',  entityType = 'SpriteEntity',  x = 525,  y = 419,  order = 6,  editingLocked = false,  treeItemIsExpanded = false,  hotSpot = {x = 91, y = 45},  texturePath = 'Data/Textures/Scenes/08_Lauras_room/Z_Hipo/zh_hair_comb.png',  width = 156,  height = 77,  },
		{ name = 'area_find_hair_comb',  entityType = 'SpriteEntity',  x = 513,  y = 419,  order = 30,  angle = -13,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = false,  treeItemIsExpanded = false,  hotSpot = {x = 126, y = 50},  width = 252,  height = 100,  },
		{ name = 'area_apply_green_eye',  entityType = 'SpriteEntity',  x = 442,  y = 335,  order = 30,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = false,  treeItemIsExpanded = false,  hotSpot = {x = 50, y = 50},  width = 100,  height = 100,  },
	}
	return objects
end
