public void tick() {
		if (input.mleft && input.mright) {
			this.vel.clearX();
			this.isMoving = false;
		} else if (input.mleft) {
			if (this.vel.getX() > -this.acceleration.getX()) this.vel.subtract(move, 0);
			this.isMoving = true;
			this.left = true;
		} else if (input.mright) {
			if (this.vel.getX() < this.acceleration.getX()) this.vel.add(move, 0);
			this.isMoving = true;
			this.left = false;
		} else {
			if (this.vel.getX() > 0) {
				this.vel.subtract(slow, 0);
				if (this.vel.getX() < 0) this.vel.clearX();
			}
			if (left && this.vel.getX() < 0) {
				this.vel.add(slow, 0);
				if (this.vel.getX() > 0) this.vel.clearX();
			}
			this.isMoving = false;
		}

		if (input.mup && isOnGround && canJump) {
			this.vel.setY(jumpHeight);
			canJump = false;
			isOnGround = false;
		}

		if (!canJump) jumpTimer--;
		if (jumpTimer <= 0) {
			jumpTimer = jumpCooldown;
			canJump = true;
		}

		this.vel.add(0, this.GRAVITY);

		if (checkCollision(0, vel.getY())) {
			this.vel.clearY();
			this.isOnGround = true;
		}
		if (checkCollision(vel.getX(), 0)) {
			this.vel.clearX();
		}
		
		this.pos.add(vel);

		if (input.aright) {
			if (input.adown) angle = 45;
			else if (input.aup) angle = 315;
			else angle = 0;
		} else if (input.aleft) {
			if (input.adown) angle = 45 + 90;
			else if (input.aup) angle = 315 - 90;
			else angle = 180;
		} else if (input.aup) {
			angle = 270;
		} else if (input.adown) {
			angle = 90;
		}

		if (input.aright || input.aleft || input.aup || input.adown) {
			fireProjectile(this.pos.getX() + 5, this.pos.getY() + 3, angle);
		}

		if (!canShoot) {
			if (timer > 0) timer--;
			if (timer <= 0) {
				canShoot = true;
			}
		}
	}