Skip to content
Browse files

alient explosion

  • Loading branch information...
1 parent efb67d5 commit 7df2e3402277b37b8740880daf45b07ff10ace7a Seth Ladd committed Dec 29, 2011
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
20 AlienExplosion.dart
@@ -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
1 BadAliensDart.dart
@@ -6,6 +6,7 @@
#source('Game.dart');
#source('Point.dart');
#source('Alien.dart');
+#source('AlienExplosion.dart');
class BadAliensDart {
View
47,107 BadAliensDart.dart.app.js
47,107 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2 GameEntity.dart
@@ -8,6 +8,8 @@ class GameEntity {
GameEntity(Game this.game);
+ GameEntity.withPosition(Game this.game, num this.x, num this.y);
+
abstract void update();
void draw(ctx) {

0 comments on commit 7df2e34

Please sign in to comment.
Something went wrong with that request. Please try again.