function init()
	timer = 0
	power = 0
end

function draw(dt)
	local active = GetBool("level.laser")
	if active then
		timer = timer + dt
		power = power + math.random(-3, (2400-power)*0.1)
	else
		power = 0
		timer = 0
	end
	if power < 0 then power = 0 end
	if power > 2400 then power = 2400 end
	UiColor(0.7, 0.6, 0.3)
	UiTranslate(10, 10)
	UiRect(UiWidth()-20, UiHeight()-20)
	UiColor(0,0,0)
	UiTranslate(5, 5)
	UiRect(UiWidth()-30, UiHeight()-30)
	UiColor(0.7, 0.6, 0.3)
	UiTranslate(20, 50)
	UiFont("bold.ttf", 32)
	UiText("ÍÏÜÎÞÊ ÌÀÈÅÑÎÞÊ ÑÅÈÀË", true)
	UiText("Âõé õìõöéðº çòöòåº", true)
	UiText("Íãîõ. ðòÿñòõö¼: 2400 GJ/pC", true)
	UiTranslate(0, 20)
	UiText("Óéîùÿã¿ ðòÿñòõö¼: "..power, true)
	if active and math.mod(timer, 0.5) < 0.25 then
		UiText("ÀËÓÉÂÎÏ")
	end	
	UiTranslate(0, 60)
	local w=730
	local h=50
	local fraction = 0.5
	UiRect(w, h)
	UiTranslate(5, 5)
	UiColor(0,0,0)
	UiRect(w-10, h-10)
	UiTranslate(5, 5)
	UiColor(0.7, 0.6, 0.3)
	UiRect((w-20)*(power/2400), h-20, 20)
end
