package org.egordorichev.lasttry;

import org.newdawn.slick.Graphics;

public class Camera {
	private float x = 0;
	private float y = 0;

	public void set(Graphics graphics) {
		graphics.translate(-this.x, -this.y);
	}

	public void unset(Graphics graphics) {
		graphics.translate(this.x, this.y);
	}

	public void setPosition(float x, float y) {
		this.x = x;
		this.y = y;
	}

	public float getX() {
		return this.x;
	}

	public float getY() {
		return this.y;
	}
}
@@ -136,170 +136,381 @@
 ;%0A%0A%09
-publ
+/**%0A%09 * Moves graph
 ic
+s
  v
-oid set(Graphics graphics) %7B%0A%09%09graphics.translate(-this.x, -this.y);%0A%09%7D%0A%0A%09public void unset(Graphics graphics) %7B%0A%09%09graphics.translate(this.x, this.y);%0A%09%7D%0A
+iew point to self positio%0A%09 */%0A%09public void set() %7B%0A%09%09LastTry.graphics.translate(-this.x, -this.y);%0A%09%7D%0A%0A%09/**%0A%09 * Moves camera back to the start view point%0A%09 */%0A%09public void unset() %7B%0A%09%09LastTry.graphics.translate(this.x, this.y);%0A%09%7D%0A%0A%09/**%0A%09 * Sets new camera position%0A%09 * @param x new position X cooridnate%0A%09 * @param y new position Y coordinate%0A%09 */
 %0A%09pu
@@ -579,24 +579,66 @@
 .y = y;%0A%09%7D%0A%0A
+%09/**%0A%09 * @return camera x coordinate%0A%09 */%0A
 %09public floa
@@ -668,16 +668,59 @@
 s.x;%0A%09%7D%0A
+%09%0A%09/**%0A%09 * @return camera y coordinate%0A%09 */
 %0A%09public
@@ -756,8 +756,9 @@
 .y;%0A%09%7D%0A%7D
+%0A

Update Camera.java