Permalink
Browse files

alient explosion

  • Loading branch information...
Seth Ladd
Seth Ladd committed Dec 30, 2011
1 parent efb67d5 commit 7df2e3402277b37b8740880daf45b07ff10ace7a
Showing with 47,130 additions and 0 deletions.
  1. +20 −0 AlienExplosion.dart
  2. +1 −0 BadAliensDart.dart
  3. +47,107 −0 BadAliensDart.dart.app.js
  4. +2 −0 GameEntity.dart
View
@@ -0,0 +1,20 @@
+class AlienExplosion extends GameEntity {
+
+ Animation animation;
+
+ AlienExplosion(Game game, num x, num y) : super.withPosition(game, x, y) {
+ animation = new Animation(ASSET_MANAGER.getAsset('img/alien-explosion.png'), 69, 0.05);
+ this.radius = this.animation.frameWidth / 2;
+ }
+
+ void update() {
+ if (animation.isDone()) {
+ removeFromWorld = true;
+ }
+ }
+
+ void draw(ctx) {
+ super.draw(ctx);
+ animation.drawFrame(game.clockTick, ctx, x, y);
+ }
+}
View
@@ -6,6 +6,7 @@
#source('Game.dart');
#source('Point.dart');
#source('Alien.dart');
+#source('AlienExplosion.dart');
class BadAliensDart {
Oops, something went wrong.

0 comments on commit 7df2e34

Please sign in to comment.