From ab1635389edddaacb1fdbddb35a9b29dfa63f1f1 Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 26 Feb 2014 18:25:08 +0200 Subject: [PATCH] Add set coord method --- .../src/com/annimon/militaryhero/SniperAim.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Military-Hero-Core/src/com/annimon/militaryhero/SniperAim.java b/Military-Hero-Core/src/com/annimon/militaryhero/SniperAim.java index c499c4e..92fb3a1 100644 --- a/Military-Hero-Core/src/com/annimon/militaryhero/SniperAim.java +++ b/Military-Hero-Core/src/com/annimon/militaryhero/SniperAim.java @@ -35,6 +35,11 @@ public class SniperAim { else if (y + ah2 > height) y = height - ah2; } + public void set(int x, int y) { + this.x = x - aimWidth / 2; + this.y = y - aimHeight / 2; + } + public int getAimX() { return x + aimWidth / 2; }