class 'l_07_Jimmy' (PlayField)

local tool1 = '06_skeleton_key'
local BBT = 'BBT_07_JIMMY'
local AREA_APPLY = 'area_apply_tool'
local Count = 5
local delta_angle = 10
local end_game_time = 1.3
--=============================================
function l_07_Jimmy:__init(game_scene, name, path)
	PlayField.__init(self, game_scene, name, path)

	self.is_outdoor_scene = false
	
	self:getPanel():setMode(EPanelMode.QUEST);
	local function on_apply_tool_1(e)
		if not e.save then
			self:playSound('mg_insert_key')
			self:entityFadeShow('Jimmy_1')
			self:entityFadeShow('Jimmy_2')
			self:entityFadeShow('Jimmy_2_Shadow')
			self:entityShow('compositionMain')
			self:playSound('mg_show_lock')
			local eff_anim = self:getEntityNamed('compositionMain')
			eff_anim:play()
			eff_anim.onFinish:add(function()
									eff_anim:destroy()
									self:entityHide('07_Jimmy_anim')
									end)						
			
			self.timer:add(function()
				for i = 1, Count do
					self:entityFadeShow('Rigel_'..i)
					self:entityFadeShow('Spring_'..i)
				end
				---
				self:entityFadeShow(self.Elements.Jimmy_state.Col[1].entity:getName())
				self:entityFadeShow(self.Elements.Jimmy_state.Gap[1].entity:getName())
				---
				self:entityFadeShow(self.begin:getName())
				self:entityFadeShow('Spring_Patch')
				self:entityFadeShow('Patch')
				self:entityFadeShow('Otmychka_End')
				self:entityFadeShow('Otmychka_Pryamaya_1')
			end, 0.5)
			
			if self:GetApply() then
				self:StartGame()
			else	
				self:getEntityNamed(AREA_APPLY):setCursorOverName("CursorGlass");
			end
		end
	end
	
	for i = 2, 6 do
		self:entityOpacity('Otmychka_Pryamaya_'..i, 0)
	end
	self:entityHide('compositionMain')
	
	self:registerToolApplyInfo(tool1, AREA_APPLY, on_apply_tool_1, BBT)
	
	if not self:GetApply() then
		self:StartInit()
		self:IgnoreAll(false)
	else
		self:LoadGame()
	end
	
	if not IsToolApplied(tool1) then
		self:getEntityNamed('Jimmy_1'):setVisible(false)
		self:getEntityNamed('Jimmy_2'):setVisible(false)
		for i = 1, Count do
			self.Elements.Rigel[i].entity:setVisible(false)
			self:getEntityNamed('Spring_'..i):setVisible(false)			
		end
		self.begin:setVisible(false)
		self:getEntityNamed('Spring_Patch'):setVisible(false)
		self:getEntityNamed('Patch'):setVisible(false)
		self:getEntityNamed('Jimmy_2_Shadow'):setVisible(false)
		self:getEntityNamed('Otmychka_End'):setVisible(false)
		self:getEntityNamed('Otmychka_Pryamaya_1'):setVisible(false)
		---
		self.Elements.Jimmy_state.Col[1].entity:setVisible(false)
		self.Elements.Jimmy_state.Gap[1].entity:setVisible(false)
		---
	end
	
	self:AddEvents()
end
--=============================================
function l_07_Jimmy:GetApply()
	return IsToolApplied(tool1)
end
--=============================================
function l_07_Jimmy:StartInit()
	self.Elements = {}
	self.Elements.Jimmy1 = {}
	self.Elements.Jimmy1.entity = self:getEntityNamed('Jimmy_1') 
	self.Elements.Jimmy1.light = self:getEntityNamed('Jimmy_1_Light')
	self.Elements.Jimmy1.angle = 5
	self.Elements.Jimmy2 = {}
	self.Elements.Jimmy2.entity = self:getEntityNamed('Jimmy_2') 
	self.Elements.Jimmy2.light = self:getEntityNamed('Jimmy_2_Light')
	self.Elements.Jimmy2.position = 1
	self.Elements.Rigel = {}
	for i = 1, Count do
		self.Elements.Rigel[i] = {}
		self.Elements.Rigel[i].entity = self:getEntityNamed('Rigel_'..i)
		self.Elements.Rigel[i].position = 5
	end
	self.Elements.Rigel[1].needPosition = 4
	self.Elements.Rigel[2].needPosition = 2
	self.Elements.Rigel[3].needPosition = 1
	self.Elements.Rigel[4].needPosition = 3
	self.Elements.Rigel[5].needPosition = 1
	
	self.Elements.Jimmy_state = {}
	self.Elements.Jimmy_state.Col = {}
	self.Elements.Jimmy_state.Gap = {}
	for i = 1, Count do
		self.Elements.Jimmy_state.Col[i] = {}
		self.Elements.Jimmy_state.Col[i].entity = nil
		self.Elements.Jimmy_state.Col[i].pos = 0
		self.Elements.Jimmy_state.Gap[i] = {}
		self.Elements.Jimmy_state.Gap[i].entity = nil
		self.Elements.Jimmy_state.Gap[i].pos = 0
	end
	
	self.RigelPositions = { 410, 396, 382, 368, 354 }
	self.Jimmy_1_Angles = { -100, -56, 0, 56, 100 }
	self.Jimmy_2_Positions = { 477, 459, 436, 407, 376 }
	self.Jimmy_2_Positions[0] = 502
	self.Jimmy_2_Shadow_Positions = {{413,499}, {398,478}, {373,458}, {333,422}, {310,390}}
	self.Jimmy_2_Shadow_Positions[0] = {430, 535}
	
	self.Columns = { 641, 701, 761, 821, 881 }
	self.Gaps = { 671, 731, 791, 851, 911}
	--self.Heights = { 353, 337, 321, 305, 291 }
	self.Heights = { 353, 337, 321, 305, 289 }
	self.CorrectPosition = {{-2, 0, 0, 0, 2}, {-2, -2, 0, 0, 0}, {-2, -2, -2, 0, 0}, {-2, -2, 0, 0, 2}, {-2, 0, 0, 0, 2}}
	self.begin = nil
	self.BeginX = 612
	self.BeginY = 321
	
	self.FirstLevel = 3
	
	self.Elements.otm_pos = 1
	
	self:DrawJimmy()
	Helpers.SaveObjectToGameState('07_Jimmy_Elements', self.Elements)	
end
--=============================================
function l_07_Jimmy:StartGame()
	self:getPanel():setMode(EPanelMode.MINIGAME);
	self:getEntityNamed(AREA_APPLY):hide()
	self:IgnoreAll(true)
end
--=============================================
function l_07_Jimmy:AddEvents()
	self.Elements.Jimmy1.entity:setCursorOverName('CursorActive')
	self.Elements.Jimmy2.entity:setCursorOverName('CursorActive')
	self.Elements.Jimmy1.entity.onFocusIn:add(bind(self.Jimmy_1_onFocusIn , self))
	self.Elements.Jimmy1.entity.onFocusOut:add(bind(self.Jimmy_1_onFocusOut , self))
	self.Elements.Jimmy2.entity.onFocusIn:add(bind(self.Jimmy_2_onFocusIn , self))
	self.Elements.Jimmy2.entity.onFocusOut:add(bind(self.Jimmy_2_onFocusOut , self))	
	self.Elements.Jimmy2.entity.onPress:add(bind(self.Jimmy_2_onPress , self))
	self.Elements.Jimmy1.entity.onClickBegin:add(bind(self.Jimmy_1_onClickBegin , self))
	self.Elements.Jimmy1.entity.onDragFinish:add(bind(self.Jimmy_1_onDragFinish, self));
	self.Elements.Jimmy1.entity.onDragFocusKeep:add(bind(self.Jimmy_1_onDragFocusKeep, self));
end
--=============================================
function l_07_Jimmy:Jimmy_1_onFocusIn()
	self.Elements.Jimmy1.light:setVisible(true)
end
--=============================================
function l_07_Jimmy:Jimmy_1_onFocusOut()
	self.Elements.Jimmy1.light:setVisible(false)
end
--=============================================
function l_07_Jimmy:Jimmy_1_onClickBegin()
	local drag_obj = getHandledScreenFocus():startDrag(self.Elements.Jimmy1.entity)
end
--=============================================
function l_07_Jimmy:Jimmy_1_onDragFinish()
	self:restartSound('mg_move_jimmy_1')
	local position = self:GetPosition(self.Elements.Jimmy1.entity:getRotationDeg())
	self.Elements.Jimmy1.entity:setRotationDeg(self.Jimmy_1_Angles[position])
	self.Elements.Jimmy1.angle = position
	-- переставим текущий ригель в нужную позицию
	local curRigel = self.Elements.Jimmy2.position
	if curRigel ~= 0 then
		self.Elements.Rigel[curRigel].position = position
		self.Elements.Rigel[curRigel].entity:setXY(self.Elements.Rigel[curRigel].entity:getX(), self.RigelPositions[position])
	end
	Helpers.SaveObjectToGameState('07_Jimmy_Elements', self.Elements)
	self:DrawJimmy()
end
--=============================================
function l_07_Jimmy:Jimmy_1_onDragFocusKeep()
	local mousePos = getHandledCursor():getPosition()
	-- определим четверть нахождения курсора
	local center_x = self.Elements.Jimmy1.entity:getX()
	local center_y = self.Elements.Jimmy1.entity:getY()
	local dx = math.abs(center_x - mousePos.x)
	local dy = math.abs(center_y - mousePos.y)
	if mousePos.x > center_x then
		if mousePos.y > center_y then
			-- 4 --
			local s = math.sin(dy/math.sqrt(dx * dx + dy * dy))
			angle = math.deg(math.asin(s))
			angle = angle + 90
		else
			-- 1 --
			local s = math.sin(dx/math.sqrt(dx * dx + dy * dy))
			angle = math.deg(math.asin(s))
			angle = angle
		end
	else
		if mousePos.y > center_y then
			-- 3 -- 
			local s = math.sin(dy/math.sqrt(dx * dx + dy * dy))
			angle = math.deg(math.asin(s))
			angle = -angle - 90
		else
			-- 2 -- 
			local s = math.sin(dx/math.sqrt(dx * dx + dy * dy))
			angle = math.deg(math.asin(s))
			angle = -angle
		end
	end
	self.Elements.Jimmy1.entity:setRotationDeg(angle)
end
--=============================================
function l_07_Jimmy:Jimmy_2_onFocusIn()
	self.Elements.Jimmy2.light:setVisible(true)
end
--=============================================
function l_07_Jimmy:Jimmy_2_onFocusOut()
	self.Elements.Jimmy2.light:setVisible(false)
end
--=============================================
function l_07_Jimmy:Jimmy_2_onPress()
	self:restartSound('mg_move_jimmy_2')
	if self:GetComplete() then
		self:EndGame()
		return
	end
	-- считываем текущее положение верхней отмычки
	local curUpPosition = self.Elements.Jimmy1.angle
	-- считываем положение нижней отмычки
	local curDownPosition = self.Elements.Jimmy2.position
	if self.Elements.Jimmy2.position < 5 then
		-- определим требуемое положение верхней отмычки
		local rigel_pos = self.Elements.Rigel[curDownPosition + 1].position
		-- проверим стоит ли текущий ригель в правильном положении
		if curDownPosition == 0 then 
			if curUpPosition == 5 then
				self.Elements.Jimmy2.position = 1
				---
				self:getEntityNamed('Jimmy_2_Shadow'):setXY(self.Jimmy_2_Shadow_Positions[self.Elements.Jimmy2.position][1], self.Jimmy_2_Shadow_Positions[self.Elements.Jimmy2.position][2])
				---				
				self.Elements.Jimmy2.entity:setXY(self.Elements.Jimmy2.entity:getX(), self.Jimmy_2_Positions[self.Elements.Jimmy2.position])
				self.Elements.Jimmy1.angle = 5
				self.Elements.Jimmy1.entity:setRotationDeg(self.Jimmy_1_Angles[5])
			else
				
			end
		else
			if self.Elements.Rigel[curDownPosition].position == self.Elements.Rigel[curDownPosition].needPosition then
				self.Elements.Jimmy2.position = self.Elements.Jimmy2.position + 1
				self.Elements.Jimmy2.entity:setXY(self.Elements.Jimmy2.entity:getX(), self.Jimmy_2_Positions[self.Elements.Jimmy2.position])
				---
				self:getEntityNamed('Jimmy_2_Shadow'):setXY(self.Jimmy_2_Shadow_Positions[self.Elements.Jimmy2.position][1], self.Jimmy_2_Shadow_Positions[self.Elements.Jimmy2.position][2])
				---
				self.Elements.Jimmy1.angle = 5
				self.Elements.Jimmy1.entity:setRotationDeg(self.Jimmy_1_Angles[5])
				
				self.Elements.otm_pos = self.Elements.otm_pos + 1
				self:entityOpacity('Otmychka_Pryamaya_'..self.Elements.otm_pos, 1)
				self:restartSound('mg_move_riegel')
			else
				
			end
		end
		self:DrawJimmy()
		Helpers.SaveObjectToGameState('07_Jimmy_Elements', self.Elements)	
	end
end
--=============================================
function l_07_Jimmy:IgnoreAll(flag)
	self.Elements.Jimmy1.entity:setRespondable(flag)
	self.Elements.Jimmy2.entity:setRespondable(flag)
end
--=============================================
function l_07_Jimmy:ShowScene()
	self:DrawJimmy()
	self:entityOpacity('Otmychka_Pryamaya_'..self.Elements.otm_pos, 1)
	self.Elements.Jimmy1.entity:setRotationDeg(self.Jimmy_1_Angles[self.Elements.Jimmy1.angle])
	self.Elements.Jimmy2.entity:setXY(self.Elements.Jimmy2.entity:getX(), self.Jimmy_2_Positions[self.Elements.Jimmy2.position])
	---
	self:getEntityNamed('Jimmy_2_Shadow'):setXY(self.Jimmy_2_Shadow_Positions[self.Elements.Jimmy2.position][1], self.Jimmy_2_Shadow_Positions[self.Elements.Jimmy2.position][2])
	---	
	for i = 1, Count do
		self.Elements.Rigel[i].entity:setXY(self.Elements.Rigel[i].entity:getX(), self.RigelPositions[self.Elements.Rigel[i].position])
	end
end
--=============================================
function l_07_Jimmy:GetComplete()
	for i = 1, Count do
		if self.Elements.Rigel[i].position ~= self.Elements.Rigel[i].needPosition then
			return false
		end
	end
	return true
end
--=============================================
function l_07_Jimmy:Reset()
	Helpers.SaveObjectToGameState('07_Jimmy_Elements', self.Elements)
	self:ShowScene()
end
--=============================================
function l_07_Jimmy:SkipMiniGame()
	self.Elements.Jimmy2.position = 5
	self.Elements.Jimmy2.entity:setXY(self.Elements.Jimmy2.entity:getX(), self.Jimmy_2_Positions[self.Elements.Jimmy2.position])
	for i = 1, Count do
		self.Elements.Rigel[i].position = self.Elements.Rigel[i].needPosition
		self.Elements.Rigel[i].entity:setXY(self.Elements.Rigel[i].entity:getX(), self.RigelPositions[self.Elements.Rigel[i].position])
	end
	
	self:DrawJimmy()
	Helpers.SaveObjectToGameState('07_Jimmy_Elements', self.Elements)	
	self:EndGame()
end
--=============================================
function l_07_Jimmy:LoadGame()
	self:getPanel():setMode(EPanelMode.MINIGAME)
	self:getEntityNamed(AREA_APPLY):hide()
	self.Elements = Helpers.RestoreObjectFromGameState('07_Jimmy_Elements')
	self.Elements.Jimmy1.entity = self:getEntityNamed('Jimmy_1') 
	self.Elements.Jimmy1.light = self:getEntityNamed('Jimmy_1_Light')
	self.Elements.Jimmy2.entity = self:getEntityNamed('Jimmy_2') 
	self.Elements.Jimmy2.light = self:getEntityNamed('Jimmy_2_Light')
	for i = 1, Count do
		self.Elements.Rigel[i].entity = self:getEntityNamed('Rigel_'..i)
	end
	self.RigelPositions = { 410, 396, 382, 368, 354 }
	self.Jimmy_1_Angles = { -100, -56, 0, 56, 100 }
	self.Jimmy_2_Positions = { 477, 459, 436, 407, 376 }
	self.Jimmy_2_Positions[0] = 502
	self.Jimmy_2_Shadow_Positions = {{413,499}, {398,478}, {373,458}, {333,422}, {310,390}}
	self.Jimmy_2_Shadow_Positions[0] = {430, 535}	
	self.Columns = { 641, 701, 761, 821, 881 }
	self.Gaps = { 671, 731, 791, 851, 911 }
	--self.Heights = { 353, 337, 321, 305, 291 }
	
	self.Heights = { 353, 337, 321, 305, 289 }
	self.CorrectPosition = {{-2, 0, 0, 0, 2}, {-2, -2, 0, 0, 0}, {-2, -2, -2, 0, 0}, {-2, -2, 0, 0, 2}, {-2, 0, 0, 0, 2}}
	self.begin = nil
	self.BeginX = 612
	self.BeginY = 321
	self.FirstLevel = 3	
	self:ShowScene()
end
--=============================================
function l_07_Jimmy:EndGame()
	self:IgnoreAll(false)
	self:entityOpacity('Otmychka_Pryamaya_6', 1)
	self:getPanel():setMode(EPanelMode.QUEST);
	self:completeMinigame(end_game_time)
end
--=============================================
function l_07_Jimmy:LoadJimmyPart(value)
	local path = 'Data/Textures/Minigames/07_Jimmy/'
	local y1 = 11
	local y2 = 11
	local entity
	if value == 'begin' then
		path = path..'Jimmy_Begin.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y1)
	end
	if value == 'end' or value == 0 then
		path = path..'Jimmy_End.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())				
		entity:setHotSpot(15, y1)
	end
	if value == 1 then
		path = path..'Jimmy_Delta_1.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y1)
	end
	if value == 2 then
		path = path..'Jimmy_Delta_2.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y1)
	end
	if value == 3 then
		path = path..'Jimmy_Delta_3.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y2)
	end
	if value == 4 then
		path = path..'Jimmy_Delta_4.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y2)
	end
	if value == -1 then
		path = path..'Jimmy_Delta_1.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y1)
		entity:setScale(1, -1)
	end
	if value == -2 then
		path = path..'Jimmy_Delta_2.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y1)
		entity:setScale(1, -1)
	end
	if value == -3 then
		path = path..'Jimmy_Delta_3.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y2)
		entity:setScale(1, -1)
	end
	if value == -4 then
		path = path..'Jimmy_Delta_4.png'
		entity = CreateSpriteEntity(path)
		entity:attachTo(self:getMainEntity())		
		entity:setHotSpot(15, y2)
		entity:setScale(1, -1)
	end
	return entity
end
--=============================================
function l_07_Jimmy:GetPosition(angle)
	local dTab = {}
	local min = 360
	local min_pos = 0
	for i = 1, Count do
		dTab[i] = math.abs(self.Jimmy_1_Angles[i] - angle)
		if dTab[i] <= min then
			min = dTab[i]
			min_pos = i
		end
	end
	return min_pos
end
--=============================================
function l_07_Jimmy:DrawJimmy()

	if self.Elements.Jimmy2.position ~= 0 then
		if self.begin then
			self.begin:destroy()
		end
		self.begin = self:LoadJimmyPart('end')
		self.begin:setXY(self.BeginX, self.BeginY)
		-------------------
		for i = 1, self.Elements.Jimmy2.position do
			local  dLevel
			if i == 1 then
				dLevel = self.Elements.Rigel[i].position - self.FirstLevel
			else
				dLevel = self.Elements.Rigel[i].position - self.Elements.Rigel[i - 1].position
			end
			if self.Elements.Jimmy_state.Col[i].entity then
				self.Elements.Jimmy_state.Col[i].entity:destroy()
			end
			self.Elements.Jimmy_state.Col[i].entity = self:LoadJimmyPart(dLevel)
			self.Elements.Jimmy_state.Col[i].pos = self.Elements.Rigel[i].position
			self.Elements.Jimmy_state.Col[i].entity:setXY(self.Columns[i], (self.Heights[self.Elements.Rigel[i].position] + self.CorrectPosition[i][self.Elements.Rigel[i].position]))
			if self.Elements.Jimmy_state.Gap[i].entity then
				self.Elements.Jimmy_state.Gap[i].entity:destroy()
			end
			if i == self.Elements.Jimmy2.position then
				local deriv = 0
				if (i == 4) and  (self.Elements.Rigel[i].position == 5) then
					deriv = -1
				end
					
				self.Elements.Jimmy_state.Gap[i].entity = self:LoadJimmyPart('begin')
				self.Elements.Jimmy_state.Gap[i].pos = self.Elements.Rigel[i].position
				self.Elements.Jimmy_state.Gap[i].entity:setXY(self.Gaps[i] -2, (self.Heights[self.Elements.Rigel[i].position] + self.CorrectPosition[i][self.Elements.Rigel[i].position] + deriv))				
			else
				self.Elements.Jimmy_state.Gap[i].entity = self:LoadJimmyPart('end')
				self.Elements.Jimmy_state.Gap[i].pos = self.Elements.Rigel[i].position
				self.Elements.Jimmy_state.Gap[i].entity:setXY(self.Gaps[i], (self.Heights[self.Elements.Rigel[i].position] + self.CorrectPosition[i][self.Elements.Rigel[i].position]))				
			end
		end
		-------------------
	else
		if self.begin then
			self.begin:destroy()
		end
		self.begin = self:LoadJimmyPart('begin')
		self.begin:setXY(self.BeginX, self.BeginY)
	end
	
end
--------------------------------------------------------------------------------
--                      GENERATED CONTENT. DO NOT EDIT.                       --
--------------------------------------------------------------------------------

function l_07_Jimmy:CreateLoaderTable()
	local objects =
	{
		{ name = 'BG',  entityType = 'SpriteEntity',  x = 512,  y = 384,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/BG.jpg',  width = 1366,  height = 768,  },
		{ name = 'Patch',  entityType = 'SpriteEntity',  x = 853,  y = 384,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Patch.jpg',  width = 682,  height = 768,  },
		{ name = 'Spring_Patch',  entityType = 'SpriteEntity',  x = 779,  y = 498,  order = 10,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Spring_Patch.png',  width = 296,  height = 72,  },
		{ name = 'Jimmy_1',  entityType = 'SpriteEntity',  x = 256,  y = 262,  order = 15,  angle = 100,  editingLocked = false,  treeItemIsExpanded = false,  hotSpot = {x = 30, y = 158},  texturePath = 'Data/Textures/Minigames/07_Jimmy/Jimmy_1.png',  width = 60,  height = 172,  },
		{ name = 'Jimmy_1_Light',  entityType = 'SpriteEntity',  parentName = 'Jimmy_1',  x = 0,  y = -70,  order = 0,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Jimmy_1_Light.png',  width = 48,  height = 162,  },
		{ name = 'Jimmy_1_Shadow',  entityType = 'SpriteEntity',  x = 327,  y = 278,  order = 0,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Jimmy_1_Shadow.png',  width = 40,  height = 154,  },
		{ name = 'Jimmy_2',  entityType = 'SpriteEntity',  x = 255,  y = 502,  order = 1,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Jimmy_2.png',  width = 228,  height = 394,  },
		{ name = 'Jimmy_2_Light',  entityType = 'SpriteEntity',  parentName = 'Jimmy_2',  x = 0,  y = 4,  order = 0,  isVisible = false,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Jimmy_2_Light.png',  width = 238,  height = 396,  },
		{ name = 'Jimmy_2_Shadow',  entityType = 'SpriteEntity',  x = 430,  y = 535,  order = 0,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Jimmy_2_Shadow.png',  width = 354,  height = 460,  },
		{ name = 'Jimmy_2_Patch',  entityType = 'SpriteEntity',  x = 255,  y = 244,  order = 10,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Jimmy_2_Patch.png',  width = 48,  height = 146,  },
		{ name = 'Spring_1',  entityType = 'SpriteEntity',  x = 659,  y = 415,  order = 3,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Spring.png',  width = 34,  height = 114,  },
		{ name = 'Spring_2',  entityType = 'SpriteEntity',  x = 720,  y = 415,  order = 3,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Spring.png',  width = 34,  height = 114,  },
		{ name = 'Spring_3',  entityType = 'SpriteEntity',  x = 780,  y = 415,  order = 3,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Spring.png',  width = 34,  height = 114,  },
		{ name = 'Spring_4',  entityType = 'SpriteEntity',  x = 839,  y = 415,  order = 3,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Spring.png',  width = 34,  height = 114,  },
		{ name = 'Spring_5',  entityType = 'SpriteEntity',  x = 898,  y = 415,  order = 3,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Spring.png',  width = 34,  height = 114,  },
		{ name = 'Rigel_1',  entityType = 'SpriteEntity',  x = 662,  y = 354,  order = 5,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel.png',  width = 54,  height = 118,  },
		{ name = 'Rigel_Nakladka_1',  entityType = 'SpriteEntity',  parentName = 'Rigel_1',  x = -2,  y = 0,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel_Nakladka.png',  width = 36,  height = 14,  },
		{ name = 'Rigel_2',  entityType = 'SpriteEntity',  x = 722,  y = 354,  order = 5,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel.png',  width = 54,  height = 118,  },
		{ name = 'Rigel_Nakladka_2',  entityType = 'SpriteEntity',  parentName = 'Rigel_2',  x = -2,  y = -27,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel_Nakladka.png',  width = 36,  height = 14,  },
		{ name = 'Rigel_3',  entityType = 'SpriteEntity',  x = 782,  y = 354,  order = 5,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel.png',  width = 54,  height = 118,  },
		{ name = 'Rigel_Nakladka_3',  entityType = 'SpriteEntity',  parentName = 'Rigel_3',  x = -2,  y = -40,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel_Nakladka.png',  width = 36,  height = 14,  },
		{ name = 'Rigel_4',  entityType = 'SpriteEntity',  x = 842,  y = 354,  order = 5,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel.png',  width = 54,  height = 118,  },
		{ name = 'Rigel_Nakladka_4',  entityType = 'SpriteEntity',  parentName = 'Rigel_4',  x = -2,  y = -13,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel_Nakladka.png',  width = 36,  height = 14,  },
		{ name = 'Rigel_5',  entityType = 'SpriteEntity',  x = 902,  y = 354,  order = 5,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel.png',  width = 54,  height = 118,  },
		{ name = 'Rigel_Nakladka_5',  entityType = 'SpriteEntity',  parentName = 'Rigel_5',  x = -2,  y = -40,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Rigel_Nakladka.png',  width = 36,  height = 14,  },
		{ name = 'area_apply_tool',  entityType = 'SpriteEntity',  x = 263,  y = 282,  order = 100,  color = {r = 1, g = 1, b = 1, a = 0.00392157},  editingLocked = false,  treeItemIsExpanded = false,  width = 500,  height = 500,  },
		{ name = 'Otmychka_Pryamaya_6',  entityType = 'SpriteEntity',  x = 783,  y = 369,  order = 16,  isRespondable = false,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Otmychka_Pryamaya.png',  width = 358,  height = 10,  },
		{ name = 'Otmychka_Pryamaya_5',  entityType = 'SpriteEntity',  x = 744,  y = 369,  order = 15,  isRespondable = false,  scaleX = 0.78,  scaleY = 1,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Otmychka_Pryamaya.png',  width = 358,  height = 10,  },
		{ name = 'Otmychka_Pryamaya_4',  entityType = 'SpriteEntity',  x = 715,  y = 369,  order = 14,  isRespondable = false,  scaleX = 0.62,  scaleY = 1,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Otmychka_Pryamaya.png',  width = 358,  height = 10,  },
		{ name = 'Otmychka_Pryamaya_3',  entityType = 'SpriteEntity',  x = 683,  y = 369,  order = 13,  isRespondable = false,  scaleX = 0.44,  scaleY = 1,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Otmychka_Pryamaya.png',  width = 358,  height = 10,  },
		{ name = 'Otmychka_Pryamaya_2',  entityType = 'SpriteEntity',  x = 653,  y = 369,  order = 12,  isRespondable = false,  scaleX = 0.275,  scaleY = 1,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Otmychka_Pryamaya.png',  width = 358,  height = 10,  },
		{ name = 'Otmychka_Pryamaya_1',  entityType = 'SpriteEntity',  x = 622,  y = 369,  order = 11,  isRespondable = false,  scaleX = 0.1,  scaleY = 1,  editingLocked = false,  treeItemIsExpanded = false,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Otmychka_Pryamaya.png',  width = 358,  height = 10,  },
		{ name = 'Otmychka_End',  entityType = 'SpriteEntity',  x = 606,  y = 369,  order = 17,  editingLocked = false,  treeItemIsExpanded = true,  texturePath = 'Data/Textures/Minigames/07_Jimmy/Jimmy_End_1.png',  width = 30,  height = 22,  },
		{ name = '07_Jimmy_anim',  entityType = 'CompositionContainer',  x = -193,  y = -7,  order = 0,  editingLocked = false,  treeItemIsExpanded = true,  path = 'Data/Scripts/Minigames/07_Jimmy/Anim/07_Jimmy_anim.lua',  },
		{ name = 'compositionMain',  entityType = 'CompositionSequence',  parentName = '07_Jimmy_anim',  x = 0,  y = 0,  order = 0,  editingLocked = false,  treeItemIsExpanded = false,  speed = 1,  },
	}
	return objects
end
