Handle all sprite events at the end of each SpriteManager.tick() so

that observers can do things like remove sprites without unhappy
side-effects.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@335 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Walter Korman
2001-09-07 23:01:53 +00:00
parent 45ee2f682b
commit 4553c01d6d
4 changed files with 141 additions and 59 deletions
@@ -1,5 +1,5 @@
//
// $Id: SpriteObserver.java,v 1.1 2001/09/05 00:40:33 shaper Exp $
// $Id: SpriteObserver.java,v 1.2 2001/09/07 23:01:53 shaper Exp $
package com.threerings.media.sprite;
@@ -16,27 +16,7 @@ public interface SpriteObserver
* sprite.
*
* @param sprite the involved sprite.
* @param eventCode the type of sprite event.
* @param arg the argument associated with the event.
* @param event the sprite event.
*/
public void spriteChanged (Sprite sprite, int eventCode, Object arg);
/**
* Event code noting that the sprite completed a path node. The
* argument to the event is the {@link PathNode} completed.
*/
public static final int FINISHED_PATH_NODE = 0;
/**
* Event code noting that the sprite completed its entire path.
* The argument to the event is the {@link Path} completed.
*/
public static final int FINISHED_PATH = 1;
/**
* Event code noting that the sprite collided with another
* sprite. The argument to the event is the {@link Sprite} the
* observed sprite collided with.
*/
public static final int COLLIDED_SPRITE = 2;
public void spriteChanged (SpriteEvent event);
}