LoadResource("fonts.xml")

--LoadResource("MenuResource.xml")
--LoadResource("ISpyFieldResources.xml")

GUI:LoadText("new_text.xml","English",0)

--LoadResource("Slot_Resource.xml")
LoadResource("Pers_Resource.xml")
LoadResource("LP_Resource.xml")
LoadResource("Second_Person_Resource.xml")
LoadResource("GUI_Resource.xml")

LoadResource("Music.xml")
LoadResource("NewSound.xml")

Sound:LoadGardenSounds("GardenSounds.xml")

LoadAllEffects()


local sndVolume = gameInfo:getSoundVolumeInScreenSaver()
local musVolume = gameInfo:getMusicVolumeInScreenSaver()
local envVolume = gameInfo:getEnvVolumeInScreenSaver()

Sound:SetSoundVolume(sndVolume)
Sound:SetMusicVolume(musVolume)
Sound:SetEnvVolume(envVolume)

GUI:LoadLayers("Garden_GUI.xml")
--GUI:LoadLayers("Shop_GUI.xml")

UploadGardenResource()
GUI:getLayer("Garden"):getWidget("Garden"):AcceptMessage (Message("InitGarden"))
if (gameInfo:isRainInScreenSaver()) then
	SetEnableRain(true);
	StartRain(false, math.random(150, 200), math.random(30, 70)/100, 2*gameInfo:getRainStrenghtSS()/3, gameInfo:getRainStrenghtSS()) -- (дождь идёт сразу, как долго идёт дождь, время дождя, минимальная сила, максимальная сила
else 
	SetEnableRain(false);
end
gameInfo:setBool("ScreensaverFromGame", false);

Screen:pushLayer( GUI:getLayer("Garden") )
--Screen:pushLayer( GUI:getLayer("Shop") )
Sound:FadeInTrack("Garden1", 2.0, true)

LoadResource("Textures\\LoadScreen\\LoadWinget\\LoadScreen.xml")
GUI:LoadLayers("LoadScreen.xml")
ReleaseLoadScreen();

