public void update(){
		
		int xa =0, ya=0;
		if(anim<8000){
			anim++;
		}else anim =0;
				
		if(input.up)ya--;
		if(input.down)ya++;
		if(input.left)xa--;
		if(input.right)xa++;
		
		if(xa !=0 || ya !=0){
			lastTime = System.currentTimeMillis();
			move(xa,ya);
			walking = true;
			
		} else {
			now = System.currentTimeMillis()-lastTime;
			if(now>25)
			walking= false;
		}
		
	}