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 classstatic classstatic classstatic enumstatic enumstatic final classstatic classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Pathstatic final intstatic final Path.MoveSide[][]static final Path.SideFunction[][]static final int[][]static final intstatic final Path.SideFunction[][] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Path.MoveSidecalculateMoveSides(PathNode curr, PathNode prev, PathNode next) Как двигаться по curr от prev до nextvoiddescribe()booleanget(float passedTiles) get(int index) intgetCount()intgetMoveSide(float passedTiles) getMoveSide(int nodeIdx) Может быть вызван только после prepare()Do not modifyPathNode[]getNodes()Do not modifycom.badlogic.gdx.math.Vector2getPosition(float passedTiles, int sideShiftIdx) floatgetPositionSimpleSegmentsForGraphics(int sideShift, com.badlogic.gdx.utils.Array<Path.PathSegment> out) floatgetRotation(float passedTiles, int sideShiftIdx) floatgetSpeedMultiplier(float passedTiles, int sideShiftIdx) inthashCode()booleanpassesThroughTileType(TileType tileType) voidread(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) voidwrite(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:
writein interfacecom.esotericsoftware.kryo.KryoSerializable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
readin 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()
-