Added viewWillScroll() for letting a path know that the view in which its

sprite was following a path is going to scroll; fixed bug in
getDirection(); added setDuration() which computes the path velocity based
on the time that the sprite should spend following the path.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1252 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2002-04-15 23:09:10 +00:00
parent 1678b84227
commit 834d9099d6
2 changed files with 75 additions and 12 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
//
// $Id: Path.java,v 1.2 2001/12/16 08:05:46 mdb Exp $
// $Id: Path.java,v 1.3 2002/04/15 23:09:10 mdb Exp $
package com.threerings.media.sprite;
@@ -50,6 +50,13 @@ public interface Path
*/
public void setVelocity (float velocity);
/**
* Called when the view that contains the sprite following this path
* is scrolling by the specified amount. Gives the path an opportunity
* to adjust its internal coordinates by the scrolled amount.
*/
public void viewWillScroll (int dx, int dy);
/**
* Paint this path on the screen (used for debugging purposes only).
*/