Top

Secret Chronicles of the Scripting API documentation

Class Path::Segment

Instances of this class represent a single segment of a path. It’s a purely informational object that serves no purpose beside containing the two endpoints of a path segment.

Class Methods

new

new( startx, starty, targetx, targety ) → a_path_segment

Creates a new path segment describing the given positions and their connection.

Parameters

All parameters are float values.

startx

The start X coordinate.

starty

The start Y coordinate.

targetx

The target X coordinate.

targety

The target Y coordinate.

Instance Methods

start_x

start_x() → a_float

Returns the start X coordinate.

start_y

start_y() → a_float

Returns the start Y coordinate.

target_x

target_x() → a_float

Returns the target X coordinate.

target_y

target_y() → a_float

Returns the target Y coordinate.