Added convenience method to allow adding a node to a path without
specifying a direction. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@326 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: LineSegmentPath.java,v 1.7 2001/08/21 21:18:42 mdb Exp $
|
// $Id: LineSegmentPath.java,v 1.8 2001/09/05 00:40:17 shaper Exp $
|
||||||
|
|
||||||
package com.threerings.media.sprite;
|
package com.threerings.media.sprite;
|
||||||
|
|
||||||
@@ -75,6 +75,18 @@ public class Path
|
|||||||
_nodes.add(new PathNode(x, y, dir));
|
_nodes.add(new PathNode(x, y, dir));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add a node to the path with the specified destination point.
|
||||||
|
* An arbitrary direction will be assigned to the node.
|
||||||
|
*
|
||||||
|
* @param x the x-position.
|
||||||
|
* @param y the y-position.
|
||||||
|
*/
|
||||||
|
public void addNode (int x, int y)
|
||||||
|
{
|
||||||
|
_nodes.add(new PathNode(x, y, Path.DIR_NORTH));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the requested node index in the path, or null if no such
|
* Return the requested node index in the path, or null if no such
|
||||||
* index exists.
|
* index exists.
|
||||||
|
|||||||
Reference in New Issue
Block a user