Package com.prineside.tdi2
Class Path
java.lang.Object
com.prineside.tdi2.Path
- All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static enum
static enum
static final class
static class
static interface
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Path
static final int
static final Path.MoveSide[][]
static final Path.SideFunction[][]
static final int[][]
static final int
static final Path.SideFunction[][]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Path.MoveSide
calculateMoveSides
(PathNode curr, PathNode prev, PathNode next) Как двигаться по curr от prev до nextvoid
describe()
boolean
get
(float passedTiles) get
(int index) int
getCount()
int
getMoveSide
(float passedTiles) getMoveSide
(int nodeIdx) Может быть вызван только после prepare()Do not modifyPathNode[]
getNodes()
Do not modifycom.badlogic.gdx.math.Vector2
getPosition
(float passedTiles, int sideShiftIdx) float
getPositionSimpleSegmentsForGraphics
(int sideShift, com.badlogic.gdx.utils.Array<Path.PathSegment> out) float
getRotation
(float passedTiles, int sideShiftIdx) float
getSpeedMultiplier
(float passedTiles, int sideShiftIdx) int
hashCode()
boolean
passesThroughTileType
(TileType tileType) void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
-
Field Details
-
EMPTY
-
SIDE_SHIFTS
public static final int SIDE_SHIFTS- See Also:
-
MIDDLE_SIDE_SHIFT
public static final int MIDDLE_SIDE_SHIFT- See Also:
-
SIDE_SHIFT_BY_COUNT
public static final int[][] SIDE_SHIFT_BY_COUNT -
MOVE_SIDE_BY_DIRECTIONS
-
SIDE_FUNCTIONS
-
SIDE_SIMPLE_FUNCTIONS
-
-
Constructor Details
-
Path
-
Path
-
Path
-
Path
-
Path
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
-
hashCode
public int hashCode() -
equals
-
getNodes
Do not modify -
getCount
public int getCount() -
getMoveSide
Может быть вызван только после prepare()- Returns:
- стороны тайла с указанным индексом
-
getMoveSides
Do not modify -
getMoveSide
-
copyWithStartingMoveSide
-
getLengthInTiles
public int getLengthInTiles() -
calculateMoveSides
Как двигаться по curr от prev до next -
getPosition
public com.badlogic.gdx.math.Vector2 getPosition(float passedTiles, int sideShiftIdx) - Parameters:
passedTiles
- количество пройденных тайлов от начала пути. При 0.5 / 1.5 ...находится на границе тайлов
-
passesThroughTileType
-
getPositionSimpleSegmentsForGraphics
public float getPositionSimpleSegmentsForGraphics(int sideShift, com.badlogic.gdx.utils.Array<Path.PathSegment> out) - Returns:
- длину всех сегментов
-
getSpeedMultiplier
public float getSpeedMultiplier(float passedTiles, int sideShiftIdx) -
getRotation
public float getRotation(float passedTiles, int sideShiftIdx) -
get
-
get
-
describe
-
debugDump
public void debugDump()
-