Game1.Preload = function(game){};
Game1.Preload.prototype = {
  preload: function() {
	var xmlplain = '<font><info face="Segment7" size="100" bold="0" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/><common lineHeight="100" base="80" scaleW="256" scaleH="256" pages="1" packed="0" alphaChnl="1" redChnl="0" greenChnl="0" blueChnl="0"/><pages><page id="0" file="font_0_0.png" /></pages><chars count="11"><char id="32" x="250" y="0" width="1" height="100" xoffset="0" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="48" x="0" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="49" x="192" y="101" width="12" height="100" xoffset="41" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="50" x="50" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="51" x="100" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="52" x="98" y="101" width="47" height="100" xoffset="6" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="53" x="0" y="101" width="48" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="54" x="49" y="101" width="48" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="55" x="146" y="101" width="45" height="100" xoffset="8" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="56" x="150" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /><char id="57" x="200" y="0" width="49" height="100" xoffset="4" yoffset="0" xadvance="59" page="0" chnl="15" /></chars></font>';
    this.preloadBar = this.add.sprite(this.game.world.centerX, this.game.world.centerY, 'preloadbar');
    this.preloadBar.anchor.setTo(0.5);
    this.load.setPreloadSprite(this.preloadBar);
    this.load.image('bg', 'img/ZIP_main_background.jpg');
    this.load.image('bg_ingame', 'img/ZIP_main_background.jpg'); 
    this.load.image('bg_ingame0', 'img/ZIP_g_I_2_bg1.jpg');
    this.load.image('bg_ingame3', 'img/ZIP_g_I_2_bg3.jpg');        
    this.load.image('sponsors', 'img/sponsorzy.png');  
    this.load.image('title', 'img/ZIP_main_tytul.png');
    this.load.image('pomocnik', 'img/ZIP_main_przewodnik.png');
    this.load.spritesheet('play_button', 'img/ZIP_main_button_play.png',200,200,3); 
    this.load.spritesheet('speaker', 'img/ZIP_karta_pracy_button_glosnik.png',136/2,56,2);
    this.load.spritesheet('help', 'img/ZIP_info.png', 112,112);  
    this.load.image('guiPomocnik_good', 'img/ZIP_g_I_4_przewodnik.png');
    this.load.image('guiPomocnik_bad', 'img/ZIP_g_I_4_przewodnik.png');  
    this.load.image('Finish', 'img/SPR_tytulowa_dymek_ZIP.png');
    this.load.spritesheet('info', 'img/ZIP_g_I_4_button.png',250,62,2);
    this.load.image("npc1", "img/ZIP_g_I_4_przewodnik_bg.png");
    this.load.spritesheet("gracz", 'img/ZIP_g_I_4_gracz.png', 114, 210 ,2);
    this.load.image('NPC', 'img/ZIP_g_I_4_przewodnik.png');  
   
    for (var i = 1; i<4; i++)
    {
		this.load.image("sky_"+i, 'img/ZIP_g_I_4_c'+i+'.png');
    } 
      
    this.load.spritesheet('voice', 'img/ZIP_g_I_2_zad2_voice.png', 170/2,75,2);  
    this.load.spritesheet('nextpage', 'img/ZIP_karta_pracy_button_next.png', 120,120,2);    
    this.load.image('empty', 'img/ZIP_g_I_2_zad2_empty.png');
    this.load.image('npc2', 'img/ZIP_g_I_2_zad1_przewodnik.png');  

    for (var i =0; i<4;i++)
    {
		this.load.spritesheet('arrow_'+i, 'img/ZIP_g_I_2_zad1_a_'+i+'.png', 387/3,130,3);      
    }
    
	this.load.spritesheet('gracz1', 'img/ZIP_g_I_2_zad1_gracz1.png', 320/4,147,4);
    this.load.spritesheet('gracz2', 'img/ZIP_g_I_2_zad1_gracz2.png', 320/4,147,4);
    this.load.image('game_bg', 'img/ZIP_g_I_2_zad1_plansza.png');  
    
	for (var i =1 ; i<5;i++)
    {
        this.load.image("i_"+i, "img/ZIP_g_I_2_zad2_image"+i+".png");
        this.load.image("d_"+i, "img/ZIP_g_I_2_zad2_drzewo"+i+".png");
        this.load.image("p_"+i, "img/ZIP_g_I_2_zad2_ptak"+i+".png");
    }
	
	for ( var i = 1; i<7; i++)
    {
        this.load.image("od_"+i, 'img/ZIP_g_I_2_zad3_a'+i+'.png');
        this.load.image("op_"+i, 'img/ZIP_g_I_2_zad3_b'+i+'.png');
        this.load.image("oc_"+i, 'img/ZIP_g_I_2_zad3_c'+i+'.png');
        this.load.image("oo_"+i, 'img/ZIP_g_I_2_zad3_d'+i+'.png');
    }  
  },    
  create: function() {
    this.state.start('Menu');
  },
};