------------------------------------------------------------------------------
-- class 'UsingAmulet'
------------------------------------------------------------------------------

class 'UsingAmulet' (RSLAchievment)

------------------------------------------------------------------------------
function UsingAmulet:__init(game_scene)
	RSLAchievment.__init(self, game_scene)
	self.name = 'UsingAmulet'
	self:addEventHandler('on_amulet_used', bind(self.onAmuletUsed, self))
end

------------------------------------------------------------------------------
function UsingAmulet:onAmuletUsed(args)
	self:setCompleted(true)
end

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

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