Package de.zelosfan.timedstrategy.world

Examples of de.zelosfan.timedstrategy.world.Tile


    }

    public void onClickTile(int x, int y) {
        if (x < 0 || y < 0 || x > world.WORLD_WIDTH - 1 || y > world.WORLD_HEIGHT - 1) return;

        Tile tile = world.tiles[x][y];

        if (tile instanceof Building && tile.entity == null) {
            ((BuildingTyp) tile.tiletyp).onClick((Building) tile);
        }
View Full Code Here


    }

    public void onHoveTile(int x, int y) {
        if (x < 0 || y < 0 || x > world.WORLD_WIDTH - 1 || y > world.WORLD_HEIGHT - 1) return;

        Tile tile = world.tiles[x][y];

        switch (currentAction) {
            case SELECTED_ENTITY:
                if (avaible.contains(tile)) {
                    highlighted = AStarCus.getAStarPath(world.tiles, ((Entity) current0).tile, tile, 1, false);
View Full Code Here

        if (entity.target == null) {
            ArrayList<Pathable> avaible = AStarCus.expandPath(Main.game.world.tiles, entity.tile, entity.entitytyp.speed * 3);

            for (Pathable pathable: avaible) {
                Tile tile = (Tile) pathable;

                if (tile.entity != null) {
                    Entity entity1 = tile.entity;
                    if (!tile.entity.team.equals(entity.team)) {
                        if (Main.game.calculateFightCost(entity, entity.tile, entity1) <= -5 || Game.redTeam.hq.getPositionV2().dst(entity1.tile.getPositionV2()) < 14) {
View Full Code Here

            for (int i = -1; i <= 1; i++) {
                for (int l = -1; l <= 1; l++) {
                    if (current.getPositionV2().x + i < nodes.length && current.getPositionV2().y + l < nodes[0].length && current.getPositionV2().x + i >= 0 && current.getPositionV2().y + l >= 0) {
                        if (current.isWalkable(current.equals(start))) {
                            if (Math.abs(i) != Math.abs(l)) {
                                Tile neighbor = nodes[((int) current.getPositionV2().x + i)][((int) current.getPositionV2().y + l)];
                                int additionalResistance = Main.game.world.getIntelligentWaycost(neighbor, entity);

                                int tentative_g_score = g_score.get(current) + additionalResistance;

View Full Code Here

TOP

Related Classes of de.zelosfan.timedstrategy.world.Tile

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.