XposeCraft  1.0.1-rc1
Public API for Arena Gameplay
XposeCraft.Game.Path Class Reference

Path between two Positions that uses pathfinding mainly for length comparison purposes. More...

Public Member Functions

 Path (Position from, Position to)
 Create a Path between two Positions. More...
 

Static Public Member Functions

static bool operator< (Path left, Path right)
 
static bool operator> (Path left, Path right)
 
static bool operator<= (Path left, Path right)
 
static bool operator>= (Path left, Path right)
 

Properties

Position From [get]
 Closest available Position to the one used as a Path source. More...
 
Position To [get]
 Closest available Position to the one used as a Path destination. More...
 
int Length [get]
 Length representing the number of available Positions between the two Positions (inclusive), or some available that are closest to them. More...
 
int [] PointLocations [get]
 Continuous locations of the Path. More...
 

Detailed Description

Path between two Positions that uses pathfinding mainly for length comparison purposes.

Constructor & Destructor Documentation

◆ Path()

XposeCraft.Game.Path.Path ( Position  from,
Position  to 
)

Create a Path between two Positions.

Parameters
fromSource Position.
toDestination Position.
Exceptions
ArgumentNullExceptionThrown if any of the Positions is null.

Member Function Documentation

◆ operator<()

static bool XposeCraft.Game.Path.operator< ( Path  left,
Path  right 
)
static

◆ operator<=()

static bool XposeCraft.Game.Path.operator<= ( Path  left,
Path  right 
)
static

◆ operator>()

static bool XposeCraft.Game.Path.operator> ( Path  left,
Path  right 
)
static

◆ operator>=()

static bool XposeCraft.Game.Path.operator>= ( Path  left,
Path  right 
)
static

Property Documentation

◆ From

Position XposeCraft.Game.Path.From
get

Closest available Position to the one used as a Path source.

◆ Length

int XposeCraft.Game.Path.Length
get

Length representing the number of available Positions between the two Positions (inclusive), or some available that are closest to them.

Value 0 means the Path is invalid, which is most likely to happen when both Positions are unavailable.

◆ PointLocations

int [] XposeCraft.Game.Path.PointLocations
get

Continuous locations of the Path.

This API is experimental and may be turned to Positions or removed in a later release.

◆ To

Position XposeCraft.Game.Path.To
get

Closest available Position to the one used as a Path destination.