var tiempo=0;

var BootGame={
	init:function(){
		var me=this;
		this.game.scale.forcePortrait=true;
    	this.game.scale.pageAlignHorizontally = true;
    	this.game.scale.pageAlignVertically = true;
	},
	preload:function(){
		var me=this;
		me.game.load.image('logo','resources/images/ACorp.png');
	},
	create:function(){
		var me=this;

		me.logo= me.game.add.image(0,185,'logo');
		//me.logo.scale.set(0.3);
		me.logo.width*=0.3;
		me.logo.height*=0.3;
		me.logo.x=(me.game.world.centerX-me.logo.width/2);

		me.cargando=me.game.add.text(me.logo.x+25, 440, 'Cargando...', {font: "40px Forte", align: "left"});
		me.cargando.fill="White";

	},
	update:function(){
		var me=this;
		tiempo+=1;
		if(tiempo>20 && tiempo<60){
			me.cargando.text="Cargando";
		}
		if(tiempo>60 && tiempo<120){
			me.cargando.text="Cargando.";
		}
		if(tiempo>120 && tiempo<240){
			me.cargando.text="Cargando..";
		}
		if(tiempo>240 && tiempo<320){
			me.cargando.text="Cargando...";
			tiempo=0;

		}
		if(tiempo==0){
			MyGame.state.start('menu');
		}
	}
}