@Override
	public void update(GameContainer gc, StateBasedGame sb, float delta) {		
		if (cooldown <= 0) {
			cooldown = 0;
			onCooldown = false;
			

		} else if (onCooldown) {
			if(invincibleTime >=3000){
				invincible=false;
			}
			cooldown -= delta;
			invincibleTime+=delta;
		}

	}