00fde3eeb3
rather than codes to indicate different types of events. Also modified name of sprite observer callback as spriteChanged() implies that the sprite actually changed which it may not have, whereas handleEvent() doesn't imply anything other than the sprite observer is being asked to deal with a sprite event. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@338 542714f4-19e9-0310-aa3c-eee0fc999fb1
33 lines
636 B
Java
33 lines
636 B
Java
//
|
|
// $Id: SpriteEvent.java,v 1.2 2001/09/13 19:36:20 mdb Exp $
|
|
|
|
package com.threerings.media.sprite;
|
|
|
|
/**
|
|
* A sprite event is sent to all of a sprite's observers whenever one of
|
|
* the various possible sprite events takes place.
|
|
*/
|
|
public class SpriteEvent
|
|
{
|
|
/**
|
|
* Create a sprite event.
|
|
*
|
|
* @param sprite the involved sprite.
|
|
*/
|
|
public SpriteEvent (Sprite sprite)
|
|
{
|
|
_sprite = sprite;
|
|
}
|
|
|
|
/**
|
|
* Returns the sprite involved in the event.
|
|
*/
|
|
public Sprite getSprite ()
|
|
{
|
|
return _sprite;
|
|
}
|
|
|
|
/** The sprite associated with this event. */
|
|
protected Sprite _sprite;
|
|
}
|