Search in sources :

Example 31 with Coordinates

use of main.game.bf.Coordinates in project Eidolons by IDemiurge.

the class MapPointMaster method clicked.

public void clicked(int x, int y) {
    // Eidolons.getLauncher().getScreen().
    new Thread(new Runnable() {

        public void run() {
            String name = DialogMaster.inputText("Enter location's name", last);
            if (name != null)
                last = name;
            else
                return;
            map.put(name, new Coordinates(true, x, y));
            GuiEventManager.trigger(MapEvent.LOCATION_ADDED, new ImmutablePair(name, map.get(name)));
        }
    }, " thread").start();
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) Coordinates(main.game.bf.Coordinates)

Example 32 with Coordinates

use of main.game.bf.Coordinates in project Eidolons by IDemiurge.

the class MapMoveLayers method spawn.

private void spawn(MapMoveLayer container, String mapArea) {
    Coordinates c = MacroGame.getGame().getPointMaster().getCoordinates(mapArea);
    spawn(container, c.x, c.y, DEFAULT_AREA_SIZE, DEFAULT_AREA_SIZE);
}
Also used : Coordinates(main.game.bf.Coordinates)

Example 33 with Coordinates

use of main.game.bf.Coordinates in project Eidolons by IDemiurge.

the class MapParticles method load.

public void load(String data, DAY_TIME time) {
    for (String sub : StringMaster.openContainer(data)) {
        String pos = VariableManager.getVarPart(sub);
        Coordinates c = new Coordinates(true, pos);
        try {
            create((VariableManager.removeVarPart(sub)).trim(), c.x, c.y, time);
        } catch (Exception e) {
            main.system.ExceptionMaster.printStackTrace(e);
            main.system.auxiliary.log.LogMaster.log(1, "failed to l: " + sub);
        }
    }
}
Also used : Coordinates(main.game.bf.Coordinates)

Example 34 with Coordinates

use of main.game.bf.Coordinates in project Eidolons by IDemiurge.

the class PartyActor method setPosition.

@Override
public void setPosition(float x, float y) {
    super.setPosition(x, y);
    party.setCoordinates(new Coordinates(getX() + getWidth() / 2, getY() + getHeight() / 2));
}
Also used : Coordinates(main.game.bf.Coordinates)

Example 35 with Coordinates

use of main.game.bf.Coordinates in project Eidolons by IDemiurge.

the class MapScreen method centerCamera.

public void centerCamera() {
    Coordinates coordinatesActiveObj = objectStage.getMainParty().getCoordinates();
    Vector2 unitPosition = new Vector2(coordinatesActiveObj.x, coordinatesActiveObj.y);
    cameraPan(unitPosition);
}
Also used : Vector2(com.badlogic.gdx.math.Vector2) Coordinates(main.game.bf.Coordinates)

Aggregations

Coordinates (main.game.bf.Coordinates)226 Unit (eidolons.entity.obj.unit.Unit)49 ObjType (main.entity.type.ObjType)30 ArrayList (java.util.ArrayList)29 Obj (main.entity.obj.Obj)28 DC_Obj (eidolons.entity.obj.DC_Obj)22 BattleFieldObject (eidolons.entity.obj.BattleFieldObject)21 FACING_DIRECTION (main.game.bf.Coordinates.FACING_DIRECTION)21 DIRECTION (main.game.bf.Coordinates.DIRECTION)20 Ref (main.entity.Ref)15 MapBlock (eidolons.game.battlecraft.logic.dungeon.location.building.MapBlock)13 DC_Cell (eidolons.entity.obj.DC_Cell)12 Action (eidolons.game.battlecraft.ai.elements.actions.Action)11 DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)9 BufferedImage (java.awt.image.BufferedImage)8 DequeImpl (main.system.datatypes.DequeImpl)8 Vector2 (com.badlogic.gdx.math.Vector2)7 DC_UnitAction (eidolons.entity.active.DC_UnitAction)7 ZCoordinates (main.game.bf.ZCoordinates)6 ObjAtCoordinate (main.entity.type.ObjAtCoordinate)5