Android Open Source - YOGOSec Point2i






From Project

Back to project page YOGOSec.

License

The source code is released under:

GNU Lesser General Public License

If you think the Android project YOGOSec listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package YOGOSec.core.util;
/*  w  w  w . jav a  2s  . c o m*/
/**
 * @author Aritz Lopez
 * @license Lesser GNU Public License v3 (http://www.gnu.org/licenses/lgpl.html)
 */
public class Point2i implements Point<Integer> {

    private final int x, y;

    public Point2i(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public Point2i translate(int dx, int dy) {
        return new Point2i(this.x + dx, this.y + dy);
    }

    public Integer getY() {
        return y;
    }

    @Override
    public Point2i setX(Integer x) {
        return new Point2i(x, this.y);
    }

    @Override
    public Point2i setY(Integer y) {
        return new Point2i(this.x, y);
    }

    public Integer getX() {
        return x;
    }

    @Override
    public String toString() {
        return "(" + this.x + ", " + this.y + ")";
    }
}




Java Source Code List

YOGOSec.android.GameActivity.java
YOGOSec.core.Game.java
YOGOSec.core.gui.Button.java
YOGOSec.core.gui.GUIComponent.java
YOGOSec.core.gui.GUI.java
YOGOSec.core.gui.IActionListener.java
YOGOSec.core.gui.InputListener.java
YOGOSec.core.gui.ProgressBar.java
YOGOSec.core.input.Input.java
YOGOSec.core.render.Render.java
YOGOSec.core.render.YUpPixmap.java
YOGOSec.core.screens.MainMenuScreen.java
YOGOSec.core.screens.MyScreen.java
YOGOSec.core.util.Point2f.java
YOGOSec.core.util.Point2i.java
YOGOSec.core.util.Point.java
YOGOSec.core.util.Rectangle.java
YOGOSec.core.util.Rectanglef.java
YOGOSec.core.util.Rectanglei.java
YOGOSec.java.GameDesktop.java