Package transientlibs.objects.primitives

Examples of transientlibs.objects.primitives.Coords


        //mapRenderer.setView(camera);
    }

    public final void setMap(TransientAssembledMap setMap) {
        map = (TiledMapGDXContainer) setMap;       
        mapRenderer = new TransientMapRenderer(map.getTiledMapGDX().gdxMap, new Coords(positionX, positionY));
       
       
        FOVGrid = new FOVScreenGrid(map, spriteBatch);
        FOVGrid.fog = fog;
       
View Full Code Here


        infoOnHover = true;



        mapCoords = new Coords(coordX, coordY);

        //Log.warn("New tile: "+mapCoords.toRoundedString());

        //ImageLink = Images.genericTerrain;
        noHoverOnTransparent = false;
View Full Code Here

        return onMap.getTile(mapCoords.getIntX(), mapCoords.getIntY());
    }

    public Coords deltaCoords(float deltaX, float deltaY) {
        Coords result = new Coords(deltaX, deltaY);
        result.x += mapCoords.x;
        result.y += mapCoords.y;
        return result;
    }
View Full Code Here

        result.y += mapCoords.y;
        return result;
    }

    public Coords deltaCoords(Coords delta) {
        Coords result = new Coords(delta.getIntX(), delta.getIntY());
        result.x += mapCoords.x;
        result.y += mapCoords.y;
        return result;
    }
View Full Code Here

        if (result == null) {Log.error("No element "+byCode);
        return null;
        }

        return new Coords (result.screenCoords.getIntX(), result.screenCoords.getIntY());

    }
View Full Code Here

    public void addWaypoint (Coords addCoords) {
        waypoints.add(addCoords);
    }

    public void addWaypoint (int setX, int setY) {
        waypoints.add(new Coords (setX, setY));
    }
View Full Code Here

public void calculateMovementCoords (Coords fromCoords, TilelessMap fromMap) {

        PathFinder pathfinder = new PathFinder(fromCoords, fromMap);

        Coords adjustedCoords;

        int counter;
        int setX;
        int setY;
        int bestResult = 999999999;
        int bestDirection = -1;

        BasicMap onMap = Maps.currentMap;

        for (counter = 1; counter < 10; counter++) {

        adjustedCoords = targetCoords.returnAdjustedCoords(counter);
        setX = adjustedCoords.getIntX();
        setY = adjustedCoords.getIntY();

        onMap.pathfindingGoalX = setX;
        onMap.pathfindingGoalY = setY;

        pathfinder.goalX = setX;
View Full Code Here

        Detonator.INSTANCE.setBindedValue("hp", this.HP.now);
        Detonator.INSTANCE.setBindedValue("maxhp", this.HP.max);
    }

    public Coords setVectorByDirection(float multiplier) {
        Coords resultCoords = setVectorByDirection();

        resultCoords.x = resultCoords.x * multiplier;
        resultCoords.y = resultCoords.y * multiplier;

        return resultCoords;
View Full Code Here

        pathfinder.path = null;
    }

    public Coords setVectorByDirection() {

        Coords resultCoords = new Coords();

        if (direction == 7) {
            resultCoords.x = -1;
            resultCoords.y = -1;
        }
View Full Code Here

    public Coords setVectorByDirectionDefault() {

        //Log.info("Direction: "+direction);

        Coords resultCoords = new Coords();

        if (direction == 7) {
            resultCoords.x = -0.02f;
            resultCoords.y = -0.02f;
        }
View Full Code Here

TOP

Related Classes of transientlibs.objects.primitives.Coords

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.