------------------------------------------------------------------------------
-- class 'RescueTroll'
------------------------------------------------------------------------------

class 'RescueTroll' (RSLAchievment)

------------------------------------------------------------------------------
function RescueTroll:__init(game_scene)
	RSLAchievment.__init(self, game_scene)
	self.name = 'RescueTroll'
	self:addEventHandler('on_troll_rescue', bind(self.onTrollRescue, self))
end

------------------------------------------------------------------------------
function RescueTroll:onTrollRescue(args)
	self:setCompleted(true)
end

------------------------------------------------------------------------------
-- called to show the inform window saying 'you've unlocked achievment'
function RescueTroll:showUnlockedWindow(callback)
	-- self.game_scene.timer:add(function()
		self.game_scene:getInformManager():show_message('achievment_troll')
	-- end, 1)
	callback()
end

------------------------------------------------------------------------------
function RescueTroll:showUnlockedScreen(callback)
	local screen = self:createScreen('Data/Scripts/Achievments/RescueTroll/RescueTrollScreen.lua', 'RescueTrollScreen', callback)
	screen:show()
end
