Provide a timestamp with animation events.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1904 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: AnimationCompletedEvent.java,v 1.1 2002/01/11 16:17:33 shaper Exp $
|
||||
// $Id: AnimationCompletedEvent.java,v 1.2 2002/11/05 20:51:13 mdb Exp $
|
||||
|
||||
package com.threerings.media.animation;
|
||||
|
||||
@@ -9,8 +9,8 @@ package com.threerings.media.animation;
|
||||
*/
|
||||
public class AnimationCompletedEvent extends AnimationEvent
|
||||
{
|
||||
public AnimationCompletedEvent (Animation anim)
|
||||
public AnimationCompletedEvent (Animation anim, long when)
|
||||
{
|
||||
super(anim);
|
||||
super(anim, when);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: AnimationEvent.java,v 1.1 2002/01/11 16:17:33 shaper Exp $
|
||||
// $Id: AnimationEvent.java,v 1.2 2002/11/05 20:51:13 mdb Exp $
|
||||
|
||||
package com.threerings.media.animation;
|
||||
|
||||
@@ -13,10 +13,12 @@ public class AnimationEvent
|
||||
* Create an animation event.
|
||||
*
|
||||
* @param animation the involved animation.
|
||||
* @param when the time at which this event took place.
|
||||
*/
|
||||
public AnimationEvent (Animation anim)
|
||||
public AnimationEvent (Animation anim, long when)
|
||||
{
|
||||
_anim = anim;
|
||||
_when = when;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -27,6 +29,17 @@ public class AnimationEvent
|
||||
return _anim;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the time associated with this event.
|
||||
*/
|
||||
public long getWhen ()
|
||||
{
|
||||
return _when;
|
||||
}
|
||||
|
||||
/** The animation associated with this event. */
|
||||
protected Animation _anim;
|
||||
|
||||
/** The time associated with this event. */
|
||||
protected long _when;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: FrameReachedEvent.java,v 1.1 2002/09/20 21:35:11 ray Exp $
|
||||
// $Id: FrameReachedEvent.java,v 1.2 2002/11/05 20:51:13 mdb Exp $
|
||||
|
||||
package com.threerings.media.animation;
|
||||
|
||||
@@ -11,9 +11,10 @@ public class FrameReachedEvent extends AnimationEvent
|
||||
/**
|
||||
* Construct a FrameReachedEvent.
|
||||
*/
|
||||
public FrameReachedEvent (Animation anim, int frameIdx, int frameSeq)
|
||||
public FrameReachedEvent (Animation anim, long when,
|
||||
int frameIdx, int frameSeq)
|
||||
{
|
||||
super(anim);
|
||||
super(anim, when);
|
||||
_frameIdx = frameIdx;
|
||||
_frameSeq = frameSeq;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user