| Constructor and Description |
|---|
LinePath(int x1,
int y1,
int x2,
int y2,
long duration)
Constructs a line path between the two specified points that will be followed in the
specified number of milliseconds.
|
LinePath(Point dest,
long duration)
Constructs a line path that moves a pathable from whatever its location is at init time to
the dest point over the specified number of milliseconds.
|
LinePath(Point source,
Point dest,
long duration)
Constructs a line path between the two specified points that will be followed in the
specified number of milliseconds.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
computePosition(Point start,
Point end,
long elapsed,
long duration,
Point pos)
Computes the position of an entity along the path defined by the supplied start and end
points assuming that it must finish the path in the specified duration (in millis) and has
been traveling the path for the specified number of elapsed milliseconds.
|
Path |
getTranslatedInstance(int x,
int y)
Return a copy of the path, translated by the specified amounts.
|
void |
init(Pathable pable,
long timestamp)
Called once to let the path prepare itself for the process of animating the supplied
pathable.
|
void |
paint(Graphics2D gfx)
Paint this path on the screen (used for debugging purposes only).
|
boolean |
tick(Pathable pable,
long timestamp)
Called to request that this path update the position of the specified pathable based on the
supplied timestamp information.
|
fastForward, toString, wasRemovedpublic LinePath(int x1,
int y1,
int x2,
int y2,
long duration)
public LinePath(Point source, Point dest, long duration)
public LinePath(Point dest, long duration)
public Path getTranslatedInstance(int x, int y)
public void init(Pathable pable, long timestamp)
PathPath.tick(com.threerings.media.util.Pathable, long) after Path.init(com.threerings.media.util.Pathable, long) with the same
initialization timestamp.public boolean tick(Pathable pable, long timestamp)
Pathpable - the pathable whose position should be updated.timestamp - the timestamp associated with this frame.public void paint(Graphics2D gfx)
Pathpublic static void computePosition(Point start, Point end, long elapsed, long duration, Point pos)
Copyright © 2015. All rights reserved.