@@ -0,0 +1,1172 @@
+package xyz.juanes.atakingos.ui;%0A%0Apublic class AtakingosTouch%0A%7B%0A  //Check touch on a rectangle%0A  public static boolean rect(float x, float y, float px, float py, float anc, float alt)%0A  %7B%0A    //Check the x coordinate%0A    if(x %3C px %7C%7C px + anc %3C x)%7B return false; %7D%0A%0A    //Check the y coordinate%0A    if(y %3C py %7C%7C py + alt %3C y)%7B return false; %7D%0A%0A    //Default, return true%0A    return true;%0A  %7D%0A%0A  //Check touch on a scaled zone%0A  public static boolean rectScale(float x, float y, float px, float py, float anc, float alt)%0A  %7B%0A    //Return touch on a rectangle%0A    return rect(x, y, px * AtakingosLayer.scale, py * AtakingosLayer.scale, anc * AtakingosLayer.scale, alt * AtakingosLayer.scale);%0A  %7D%0A%0A  //Check touch on rectangle zone%0A  public static boolean rectZone(float x, float y, float px, float py, float anc, float alt)%0A  %7B%0A    //Get the new position x%0A    float new_posx = AtakingosLayer.zone.px + px * AtakingosLayer.scale;%0A%0A    //Get the new position y%0A    float new_posy = AtakingosLayer.zone.py + py * AtakingosLayer.scale;%0A%0A    //Return touch on a rectangle%0A    return rect(x, y, new_posx, new_posy, anc * AtakingosLayer.scale, alt * AtakingosLayer.scale);%0A  %7D%0A%7D%0A

Manage the touch regions