|
Starsector API
|
Classes | |
| interface | SegmentAPI |
Public Member Functions | |
| void | update (Vector2f location, float facing) |
| List< SegmentAPI > | getSegments () |
| void | clear () |
| void | addSegment (float x1, float y1, float x2, float y2) |
| void | addSegment (float x2, float y2) |
| List< SegmentAPI > | getOrigSegments () |
The bounds HAVE to be a polygon - can't just be a disconnected set of segments.
The polygon can be either concave or convex.
Copyright 2012 Fractal Softworks, LLC
Definition at line 17 of file BoundsAPI.java.
| 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).
| x1 | |
| y1 | |
| x2 | |
| y2 |
| 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.
| x2 | |
| y2 |
| void com.fs.starfarer.api.combat.BoundsAPI.clear | ( | ) |
Remove all segments.
| List< SegmentAPI > com.fs.starfarer.api.combat.BoundsAPI.getOrigSegments | ( | ) |
| List< SegmentAPI > com.fs.starfarer.api.combat.BoundsAPI.getSegments | ( | ) |
| 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.