local PREFIX_PATH = "Data/Textures/GUI/Hint/"

createCompositionHint = function( targetObjX, targetObjY, hintPos, hintScale, hintAngle )
	local compositionHint = CreateCompositionSequence()
	local compositionDuration = 3
	compositionHint:setDuration(compositionDuration)
	compositionHint:setName("Layer_1" )
	compositionHint:setBoundingBox( Rectanglef(0, 0, 1366,768) )
 
	local element
	local effector
 
	-- Layer Layer_1
	element = createCompositionLinesStraight()
	element:setName("Layer_1")
	compositionHint:addElement(element)
	element:setHotSpot(1303.65307457, 384.196022772)
	element:setParentElement(compositionHint)
	element:setScrXY(hintPos.x, hintPos.y)
	element:setScale(hintScale)
	element:setRotationRad(hintAngle)
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.4)
	effector:setKey(_TRACK_O, 0, 0)
	effector:setKey(_TRACK_O, 0.29166666666667, 1)
	effector:setKey(_TRACK_O, 1.625, 1)
	effector:setKey(_TRACK_O, 1.83333333333333, 0)
	effector:play()

	-- Layer Layer_2
	element = CreateCompositionElement(PREFIX_PATH.."circle_[].jpg")
	element:setName("Layer_2")
	compositionHint:addElement(element)
	element:setHotSpot(130, 129)
	element:setParentElement(compositionHint)
	element:setScrXY(targetObjX, targetObjY)
 	element:setScale(1)

					local anim = element
					anim:setAnimationSize(259,257)
					anim:setFrameSynchronizationActive(true)
					anim:setFramesCount(36)
					anim:setFPS(24)
					anim:setMode(_ANIM_FWD)
					anim:setBlend(_EBlendModeColorAdd)
					anim:play()
 
	effector = element:getEffector()
	effector:setLifeTime(0.8, 2.5)
	effector:play()
 
	compositionHint:play()
 
	return compositionHint
end

createCompositionLinesStraight = function()
	local compositionlines_straight = CreateCompositionSequence()
	local compositionDuration = 1.3
	compositionlines_straight:setDuration(compositionDuration)
 
	local element
	local effector
 
	-- Layer Layer_1
	element = CreateCompositionElement(PREFIX_PATH.."hint_start_line_[].png")
	element:setName("Layer_1")
	compositionlines_straight:addElement(element)
	element:setHotSpot(331.045267489712, 29.0212765957447)
	element:setParentElement(compositionlines_straight)
	element:setXY(779, 377)

					local anim = element
					anim:setAnimationSize(338,62)
					anim:setFramesCount(14)
					anim:setFPS(12)
					anim:setMode(_ANIM_FWD + _ANIM_LOOP)
					anim:setBlend(_EBlendModeColorAdd)
					anim:play()
  
	effector = element:getEffector()
	effector:setLifeTime(0.25, 1.41666666666667)
	effector:setKey(_TRACK_SX, 0.25, 1)
	effector:setKey(_TRACK_SY, 0.25, 1.46)
	effector:setKey(_TRACK_SX, 0.75, 2.6)
	effector:setKey(_TRACK_SY, 0.75, 2.46361280776083)
	effector:setKey(_TRACK_O, 0.25, 0)
	effector:setKey(_TRACK_O, 0.58333333333333, 0.45)
	effector:play()
 
 
	-- Layer Layer_2
	element = CreateCompositionElement(PREFIX_PATH.."hint_start_line_[].png")
	element:setName("Layer_2")
	compositionlines_straight:addElement(element)
	element:setHotSpot(331.045267489712, 29.0212765957447)
	element:setParentElement(compositionlines_straight)
	element:setXY(779, 377)

					local anim = element
					anim:setAnimationSize(338,62)
					anim:setFramesCount(14)
					anim:setFPS(12)
					anim:setMode(_ANIM_FWD + _ANIM_LOOP)
					anim:setBlend(_EBlendModeColorAdd)
					anim:play()
 
	effector = element:getEffector()
	effector:setLifeTime(0.25, 1.41666666666667)
	effector:setKey(_TRACK_SX, 0.25, 1)
	effector:setKey(_TRACK_SY, 0.25, 1.46)
	effector:setKey(_TRACK_SX, 0.75, 2.6)
	effector:setKey(_TRACK_SY, 0.75, 2.46361280776083)
	effector:setKey(_TRACK_O, 0.25, 0)
	effector:setKey(_TRACK_O, 0.58333333333333, 1)
	effector:play()
 
 
	-- Layer Layer_3
	element = CreateCompositionElement(PREFIX_PATH.."hint_start_line_[].png")
	element:setName("Layer_3")
	compositionlines_straight:addElement(element)
	element:setHotSpot(331.045267489712, 29.0212765957447)
	element:setParentElement(compositionlines_straight)
	element:setXY(1268, 357)

					local anim = element
					anim:setAnimationSize(338,62)
					anim:setFramesCount(14)
					anim:setFPS(12)
					anim:setMode(_ANIM_FWD + _ANIM_LOOP)
					anim:setBlend(_EBlendModeColorAdd)
					anim:play()
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:setKey(_TRACK_SX, 0, 1)
	effector:setKey(_TRACK_SY, 0, 1.46)
	effector:setKey(_TRACK_SX, 0.5, 3)
	effector:setKey(_TRACK_SY, 0.5, 3)
	effector:setKey(_TRACK_O, 0, 0)
	effector:setKey(_TRACK_O, 0.33333333333333, 0.45)
	effector:play()
 
 
	-- Layer Layer_4
	element = CreateCompositionElement(PREFIX_PATH.."hint_start_line_[].png")
	element:setName("Layer_4")
	compositionlines_straight:addElement(element)
	element:setHotSpot(331.045267489712, 29.0212765957447)
	element:setParentElement(compositionlines_straight)
	element:setXY(1268, 357)

					local anim = element
					anim:setAnimationSize(338,62)
					anim:setFramesCount(14)
					anim:setFPS(12)
					anim:setMode(_ANIM_FWD + _ANIM_LOOP)
					anim:setBlend(_EBlendModeColorAdd)
					anim:play()
 
	effector = element:getEffector()
	effector:setLifeTime(0, 1.16666666666667)
	effector:setKey(_TRACK_SX, 0, 1)
	effector:setKey(_TRACK_SY, 0, 1.46)
	effector:setKey(_TRACK_SX, 0.5, 3)
	effector:setKey(_TRACK_SY, 0.5, 3)
	effector:setKey(_TRACK_O, 0, 0)
	effector:setKey(_TRACK_O, 0.33333333333333, 1)
	effector:play()
 
	compositionlines_straight:play()
 
	return compositionlines_straight
end