PulpCore

pulpcore.animation.event
Class RemoveSpriteEvent

java.lang.Object
  extended by pulpcore.animation.Animation
      extended by pulpcore.animation.event.TimelineEvent
          extended by pulpcore.animation.event.RemoveSpriteEvent
All Implemented Interfaces:
Runnable

public class RemoveSpriteEvent
extends TimelineEvent

A RemoveSpriteEvent is a TimelineEvent that removes a Sprite from a Group after a specified delay.


Field Summary
 
Fields inherited from class pulpcore.animation.Animation
LOOP_FOREVER
 
Constructor Summary
RemoveSpriteEvent(Group group, Sprite sprite, int delay)
          Removes the specified sprite from the specified group after the delay.
RemoveSpriteEvent(Sprite sprite, int delay)
          Removes the specified sprite from its parent after the delay.
 
Method Summary
 void run()
           
 
Methods inherited from class pulpcore.animation.event.TimelineEvent
hasExecuted, updateState
 
Methods inherited from class pulpcore.animation.Animation
fastForward, getDuration, getEasing, getLoopDelay, getNumLoops, getStartDelay, getTime, getTotalDuration, isFinished, loop, loop, loopForever, loopForever, rewind, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoveSpriteEvent

public RemoveSpriteEvent(Sprite sprite,
                         int delay)
Removes the specified sprite from its parent after the delay. The parent is determined at the time the event runs. If the sprite does not have a parent at the time the event runs, this event does nothing.


RemoveSpriteEvent

public RemoveSpriteEvent(Group group,
                         Sprite sprite,
                         int delay)
Removes the specified sprite from the specified group after the delay. If the sprite does not belong to the Group at the time the event runs, this event does nothing.

Method Detail

run

public void run()
Specified by:
run in interface Runnable
Specified by:
run in class TimelineEvent

PulpCore

Copyright © 2007-2009 Interactive Pulp, LLC.