Android Open Source - android_game_engine Node






From Project

Back to project page android_game_engine.

License

The source code is released under:

GNU General Public License

If you think the Android project android_game_engine 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 org.es.engine.toolbox.pathfinding;
/*ww w . ja va 2  s.c om*/
/**
 * Created by lebronneck on 24/02/14.
 * <p/>
 * Node's structure
 * Gets the position and keeps the parent node
 */
public class Node {

    private int mX;
    private int mY;
    private Node mParentNode;
    private double mG = 0d;
    private double mF = 0d;

    public Node(int x, int y) {
        mX = x;
        mY = y;
    }

    public String nodeName() { return mX + "x" + mY; }

    public void setParentNode(Node parentNode) { mParentNode = parentNode; }

    @Override
    public boolean equals(Object object) {
        if (object instanceof Node) {
            Node node = (Node) object;
            return mX == node.mX && mY == node.mY;
        }
        return false;
    }

    public int getX() { return mX; }

    public void setX(int x) { mX = x; }

    public int getY() { return mY; }

    public Node getParentNode() { return mParentNode; }

    public double getG() { return mG; }

    public void setG(double g) { mG = g; }

    public double getF() { return mF; }

    public void setF(double f) { mF = f; }
}




Java Source Code List

com.google.example.games.basegameutils.BaseGameActivity.java
com.google.example.games.basegameutils.GameHelperUtils.java
com.google.example.games.basegameutils.GameHelper.java
com.google.example.games.basegameutils.ScreenUtils.java
org.es.engine.audio.Sound.java
org.es.engine.game_mechanic.DrawingThread.java
org.es.engine.game_mechanic.DrawingView.java
org.es.engine.graphics.animation.AnimationCallback.java
org.es.engine.graphics.animation.Animation.java
org.es.engine.graphics.animation.BitmapAnimation.java
org.es.engine.graphics.animation.SpriteSheetAnimation.java
org.es.engine.graphics.drawable.DrawableElement.java
org.es.engine.graphics.sprite.GenericSprite.java
org.es.engine.graphics.sprite.SpriteSheet.java
org.es.engine.graphics.sprite.Sprite.java
org.es.engine.graphics.utils.DrawTextUtils.java
org.es.engine.graphics.utils.DrawingParam.java
org.es.engine.hud.Button.java
org.es.engine.hud.Control.java
org.es.engine.hud.HUD.java
org.es.engine.hud.Text.java
org.es.engine.hud.ToggleButton.java
org.es.engine.toolbox.pathfinding.Node.java
org.es.engine.toolbox.pathfinding.ShortestPath.java