Package transientlibs.objects.primitives

Examples of transientlibs.objects.primitives.Coords


    }

   
    //@Override
    public Coords returnMapCoordsAdjusted(float scrX, float scrY, MapEye eye) {
        return new Coords((scrX/Terrain.tileWidth)+eye.eyePosition.x, (scrY/Terrain.tileHeight)+eye.eyePosition.y);
    }
View Full Code Here


        return new Coords((scrX/Terrain.tileWidth)+eye.eyePosition.x, (scrY/Terrain.tileHeight)+eye.eyePosition.y);
    }

    @Override
    public Coords returnMapCoords(float scrX, float scrY) {
        return new Coords(scrX/Terrain.tileWidth, scrY/Terrain.tileHeight);
    }
View Full Code Here

    }

   
    @Override
    public Coords returnMapCoords(float scrX, float scrY) {
        return new Coords(scrX, scrY);
    }
View Full Code Here

       
    }

    //@Override
    public Coords returnMapCoordsAdjusted(float scrX, float scrY, MapEye eye) {
         return new Coords(scrX + eye.eyePosition.x, scrY+eye.eyePosition.y);
    }
View Full Code Here

    @Override
    public Coords returnMapCoords (float scrX, float scrY) {
        float mapX = -scrY/halfTileY+scrX/halfTileX;
        float mapY = scrY/halfTileY+scrX/halfTileX;
       
        return new Coords(mapX, mapY);
    }
View Full Code Here

    //@Override
    public Coords returnMapCoordsAdjusted(float scrX, float scrY, MapEye eye) {
        float mapX = -scrY/halfTileY+scrX/halfTileX;
        float mapY = scrY/halfTileY+scrX/halfTileX;
       
        return new Coords(mapX +  eye.eyePosition.x, mapY +  eye.eyePosition.y);
    }
View Full Code Here

    public Coords returnRandomFreeSpot() {



        Coords result = new Coords();

        do {
            result.x = Detonator.INSTANCE.rng.nextInt(storedWidthInTiles) + 1;
            result.y = Detonator.INSTANCE.rng.nextInt(storedHeightInTiles) + 1;

            //Log.info("Pick random spot: "+result.x+"/"+result.y);
        } while (Detonator.INSTANCE.tileMovementCalculator.isBlocked(result.getIntX(), result.getIntY()));
        return result;
    }
View Full Code Here


        int actualX = (x * Terrain.tileWidth) - realCameraX;
        int actualY = (y * Terrain.tileHeight) - realCameraY;

        return new Coords(actualX, actualY);
    }
View Full Code Here

        int y = mapCatalogue.get(Binding.readBinding(Binding.mapBinding, getCode.toLowerCase())).sizeX;
        int x = mapCatalogue.get(Binding.readBinding(Binding.mapBinding, getCode.toLowerCase())).sizeX;
        y = y / 2;
        x = x / 2;
        //Coords ret = new Coords(Double.parseDouble(Integer.toString(x)), Double.parseDouble(Integer.toString(y)));
        Coords ret = new Coords(Float.parseFloat(Integer.toString(x)), Float.parseFloat(Integer.toString(y)));
        return ret;
    }
View Full Code Here

    public static Coords getMapCentreByID(int getID) {
        int y = (mapCatalogue.get(getID).sizeY / 2);
        int x = (mapCatalogue.get(getID).sizeX / 2);
        //Coords ret = new Coords(Double.parseDouble(Integer.toString(x)), Double.parseDouble(Integer.toString(y)));
        Coords ret = new Coords(Float.parseFloat(Integer.toString(x)), Float.parseFloat(Integer.toString(y)));
        return ret;
    }
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.