home *** CD-ROM | disk | FTP | other *** search
- import com.next.gt.Actor;
- import com.next.gt.Gamelication;
- import java.awt.Image;
-
- public class Explosion extends Actor {
- Explosion(Gamelication var1, Actor var2) {
- super.owner = var1;
- super.owner.play(super.owner.getCodeBase(), "sounds/explode1.au");
- Image var3 = super.owner.getImage(super.owner.getCodeBase(), "images/explosions.gif");
- ((Actor)this).setImage(var3, 60, 60, 4, 16);
- super.x = var2.x - (double)(super.width - var2.width) / (double)2.0F;
- super.y = var2.y - (double)(super.height - var2.height) / (double)2.0F;
- super.velocity_x = var2.velocity_x;
- super.velocity_y = var2.velocity_y;
- }
-
- public void calculateCurrentFrame() {
- if (++super.currentFrame >= super.numFrames) {
- super.owner.actorManager.removeActor(this);
- }
-
- }
- }
-