Revamped sprite observation and added support for being notified if a path

is cancelled.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2504 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2003-04-30 00:44:36 +00:00
parent 3cfccff0c6
commit 99127e4ce0
8 changed files with 102 additions and 188 deletions
@@ -0,0 +1,25 @@
//
// $Id: PathObserver.java,v 1.1 2003/04/30 00:44:36 mdb Exp $
package com.threerings.media.sprite;
import com.threerings.media.util.Path;
/**
* An interface to be implemented by classes that would like to be
* notified when a sprite completes or cancels its path.
*/
public interface PathObserver
{
/**
* Called when a sprite's path is cancelled either because a new path
* was started or the path was explicitly cancelled with {@link
* Sprite#cancelMove}.
*/
public void pathCancelled (Sprite sprite, Path path);
/**
* Called when a sprite completes its traversal of a path.
*/
public void pathCompleted (Sprite sprite, Path path, long when);
}