Skip to content

Commit

Permalink
More explosion variety.
Browse files Browse the repository at this point in the history
Explosions are randomly rotated to give them the appearance of being more unique.  Gave explosions that do not hurt Tux a less-threatining graphic, and changed the hurting explosion graphic to one without vertical shading (adapted from the Cheeseman spin-off).  All these graphics should be considered placeholders until something better, and more animated, becomes available.
  • Loading branch information
LMH0013 committed Mar 9, 2014
1 parent f8a5382 commit b727f35
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
Binary file modified data/images/objects/explosion/explosion-0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified data/images/objects/explosion/explosion-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions data/images/objects/explosion/explosion.sprite
Expand Up @@ -14,5 +14,11 @@
"explosion-1.png"
)
)
(action
(name "pop")
(fps 2)
(hitbox 0 0 48 48)
(images "pop-0.png")
)
)

Binary file added data/images/objects/explosion/pop-0.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions src/object/explosion.cpp
Expand Up @@ -65,12 +65,10 @@ Explosion::explode()
return;
state = STATE_EXPLODING;

set_action("default", 1); //TODO: the less-threatening short_fuse explosion should look less-threatening
set_action(hurt ? "default" : "pop", 1);
sprite->set_animation_loops(1); //TODO: this is necessary because set_action will not set "loops" when "action" is the default action
if (hurt)
sound_manager->play("sounds/explosion.wav", get_pos());
else
sound_manager->play("sounds/firecracker.ogg", get_pos());
sprite->set_angle(graphicsRandom.randf(0, 360)); // a random rotation on the sprite to make explosions appear more random
sound_manager->play(hurt ? "sounds/explosion.wav" : "sounds/firecracker.ogg", get_pos());


#if 0
Expand Down

0 comments on commit b727f35

Please sign in to comment.