From 8a430a41aa0c5f337b89d4a87ccc9503248c5f15 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Wed, 12 Feb 2003 05:27:57 +0000 Subject: [PATCH] Make orientation of pathable at end of path available. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2256 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/media/util/LineSegmentPath.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/util/LineSegmentPath.java b/src/java/com/threerings/media/util/LineSegmentPath.java index 572bf64a6..bb844fd92 100644 --- a/src/java/com/threerings/media/util/LineSegmentPath.java +++ b/src/java/com/threerings/media/util/LineSegmentPath.java @@ -1,5 +1,5 @@ // -// $Id: LineSegmentPath.java,v 1.27 2003/01/17 22:57:08 mdb Exp $ +// $Id: LineSegmentPath.java,v 1.28 2003/02/12 05:27:57 mdb Exp $ package com.threerings.media.util; @@ -74,6 +74,16 @@ public class LineSegmentPath createPath(points); } + /** + * Returns the orientation the sprite will face at the end of the + * path. + */ + public int getFinalOrientation () + { + return (_nodes.size() == 0) ? NORTH : + ((PathNode)_nodes.get(_nodes.size()-1)).dir; + } + /** * Add a node to the path with the specified destination point and * facing direction.