Starsector API
Loading...
Searching...
No Matches
com.fs.starfarer.api.combat.BoundsAPI Interface Reference

Classes

interface  SegmentAPI
 

Public Member Functions

void update (Vector2f location, float facing)
 
List< SegmentAPIgetSegments ()
 
void clear ()
 
void addSegment (float x1, float y1, float x2, float y2)
 
void addSegment (float x2, float y2)
 
List< SegmentAPIgetOrigSegments ()
 

Detailed Description

The bounds HAVE to be a polygon - can't just be a disconnected set of segments.

The polygon can be either concave or convex.

Author
Alex Mosolov

Copyright 2012 Fractal Softworks, LLC

Definition at line 17 of file BoundsAPI.java.

Member Function Documentation

◆ addSegment() [1/2]

void com.fs.starfarer.api.combat.BoundsAPI.addSegment ( float  x1,
float  y1,
float  x2,
float  y2 
)

Add a new segment. Coordinates are relative to entity center, with entity facing 0 degrees (i.e., to the right).

Parameters
x1
y1
x2
y2

◆ addSegment() [2/2]

void com.fs.starfarer.api.combat.BoundsAPI.addSegment ( float  x2,
float  y2 
)

Adds a segment using the end of the previously added segment as the starting point.

Parameters
x2
y2

◆ clear()

void com.fs.starfarer.api.combat.BoundsAPI.clear ( )

Remove all segments.

◆ getOrigSegments()

List< SegmentAPI > com.fs.starfarer.api.combat.BoundsAPI.getOrigSegments ( )

◆ getSegments()

List< SegmentAPI > com.fs.starfarer.api.combat.BoundsAPI.getSegments ( )

◆ update()

void com.fs.starfarer.api.combat.BoundsAPI.update ( Vector2f  location,
float  facing 
)

Updates the coordinates of the bounds to reflect the specified location and facing.


The documentation for this interface was generated from the following file: