Exemple #1
0
/**
 * @brief Plays the animation destroy of this item.
 */
void Destructible::play_destroy_animation() {

  is_being_cut = true;
  Sound::play(get_destruction_sound_id());
  get_sprite().set_current_animation("destroy");
  if (!is_drawn_in_y_order()) {
    get_entities().bring_to_front(this); // show animation destroy to front
  }
}
Exemple #2
0
/**
 * \brief Plays the animation destroy of this item.
 */
void Destructible::play_destroy_animation() {

  is_being_cut = true;
  modified_ground = GROUND_EMPTY;
  Sound::play(get_destruction_sound_id());
  get_sprite().set_current_animation("destroy");
  if (!is_drawn_in_y_order()) {
    get_entities().bring_to_front(this); // show animation destroy to front
  }
  update_ground_observers();  // The ground (if any) has just disappeared.
}
/**
 * \brief Plays the animation destroy of this item.
 */
void Destructible::play_destroy_animation() {

  is_being_cut = true;
  if (!destruction_sound_id.empty()) {
    Sound::play(destruction_sound_id);
  }
  get_sprite().set_current_animation("destroy");
  if (!is_drawn_in_y_order()) {
    get_entities().bring_to_front(*this);  // Show animation destroy to front.
  }
  update_ground_observers();  // The ground (if any) has just disappeared.
}