Stumpy no longer moonwalks while dizzy /
authorChristoph Sommer <mail@christoph-sommer.de>
Mon, 10 Jul 2006 20:56:42 +0000 (20:56 +0000)
committerChristoph Sommer <mail@christoph-sommer.de>
Mon, 10 Jul 2006 20:56:42 +0000 (20:56 +0000)
Mr.Tree's particle effects are a bit more subtle

SVN-Revision: 3983

data/images/creatures/mr_tree/dizzy-0.png [new file with mode: 0644]
data/images/creatures/mr_tree/dizzy-1.png [new file with mode: 0644]
data/images/creatures/mr_tree/dizzy-2.png [new file with mode: 0644]
data/images/creatures/mr_tree/stumpy.sprite
data/images/creatures/mr_tree/stumpy.xcf
data/images/objects/particles/bark.sprite
data/images/objects/particles/leaf.sprite
src/badguy/mrtree.cpp
src/badguy/stumpy.cpp

diff --git a/data/images/creatures/mr_tree/dizzy-0.png b/data/images/creatures/mr_tree/dizzy-0.png
new file mode 100644 (file)
index 0000000..6b89715
Binary files /dev/null and b/data/images/creatures/mr_tree/dizzy-0.png differ
diff --git a/data/images/creatures/mr_tree/dizzy-1.png b/data/images/creatures/mr_tree/dizzy-1.png
new file mode 100644 (file)
index 0000000..68a0768
Binary files /dev/null and b/data/images/creatures/mr_tree/dizzy-1.png differ
diff --git a/data/images/creatures/mr_tree/dizzy-2.png b/data/images/creatures/mr_tree/dizzy-2.png
new file mode 100644 (file)
index 0000000..834f8e8
Binary files /dev/null and b/data/images/creatures/mr_tree/dizzy-2.png differ
index fa56260..ca58445 100644 (file)
     (mirror-action "left")
   )
   (action
+    (hitbox 20 23 42 62)
+    (name "dizzy-left")
+    (images 
+      "dizzy-0.png"
+      "dizzy-1.png"
+      "dizzy-2.png"
+    )
+  )
+  (action
+    (hitbox 20 23 42 62)
+    (name "dizzy-right")
+    (mirror-action "dizzy-left")
+  )
+  (action
     (hitbox 20 23 42 42)
     (name "squished-left")
     (images 
index aca92e5..fc6b8fe 100644 (file)
Binary files a/data/images/creatures/mr_tree/stumpy.xcf and b/data/images/creatures/mr_tree/stumpy.xcf differ
index ace0f46..e9ffd0d 100644 (file)
@@ -1,7 +1,7 @@
 (supertux-sprite
  (action
   (name "default")
-(fps 4.0)
+  (fps 1.0)
   (images 
     "bark-0.png"
   )
index 82336c3..b9d0eaa 100644 (file)
@@ -1,7 +1,7 @@
 (supertux-sprite
  (action
   (name "default")
-(fps 4.0)
+  (fps 1.0)
   (images 
     "leaf-0.png"
   )
index 565cf70..7b8763f 100644 (file)
@@ -66,8 +66,8 @@ MrTree::collision_squished(Player& player)
   
   // spawn some particles
   // TODO: provide convenience function in MovingSprite or MovingObject?
-  for (int i = 0; i < 25; i++) {
-    Vector ppos = bbox.get_middle();
+  for (int px = (int)stumpy->get_bbox().p1.x; px < (int)stumpy->get_bbox().p2.x; px+=10) {
+    Vector ppos = Vector(px, stumpy->get_bbox().p1.y-5);
     float angle = systemRandom.randf(-M_PI_2, M_PI_2);
     float velocity = systemRandom.randf(45, 90);
     float vx = sin(angle)*velocity;
index 4f0fd53..342879f 100644 (file)
@@ -59,7 +59,8 @@ Stumpy::activate()
 {
   switch (mystate) {
     case STATE_INVINCIBLE:
-      WalkingBadguy::activate();
+      sprite->set_action(dir == LEFT ? "dizzy-left" : "dizzy-right");
+      bbox.set_size(sprite->get_current_hitbox_width(), sprite->get_current_hitbox_height());
       physic.set_velocity_x(0);
       break;
     case STATE_NORMAL: