Exemplo n.º 1
0
/**
 * \brief Starts the "swimming_fast" animation of the sprites.
 */
void HeroSprites::set_animation_swimming_fast() {

  set_animation_walking_common();

  tunic_sprite->set_current_animation("swimming_fast");
  stop_displaying_sword();
  stop_displaying_shield();
  stop_displaying_trail();
}
Exemplo n.º 2
0
/**
 * \brief Starts the "swimming_slow" animation of the sprites.
 */
void HeroSprites::set_animation_swimming_slow() {

  set_animation_walking_common();

  set_tunic_animation("swimming_slow");
  stop_displaying_sword();
  stop_displaying_shield();
  stop_displaying_trail();
}
Exemplo n.º 3
0
/**
 * \brief Starts the "walking" animation with sprites that represent
 * the hero carrying something.
 *
 * If the hero actually carries an item, the carried item also takes a "walking" animation.
 */
void HeroSprites::set_animation_walking_carrying() {

  set_animation_walking_common();

  tunic_sprite->set_current_animation("carrying_walking");

  if (lifted_item != NULL) {
    lifted_item->set_animation_walking();
  }
  stop_displaying_shield();
  stop_displaying_trail();
}
Exemplo n.º 4
0
/**
 * \brief Starts the "walking" animation with sprites that represent
 * the hero carrying something.
 *
 * If the hero actually carries an item, the carried item also takes a "walking" animation.
 */
void HeroSprites::set_animation_walking_carrying() {

  set_animation_walking_common();

  set_tunic_animation("carrying_walking");

  if (lifted_item != nullptr) {
    lifted_item->set_animation_walking();
  }
  stop_displaying_shield();
  stop_displaying_trail();
}
Exemplo n.º 5
0
/**
 * \brief Starts the normal "walking" animation of the hero's sprites.
 */
void HeroSprites::set_animation_walking_normal() {

  set_animation_walking_common();

  if (equipment.has_ability("shield")) {

    tunic_sprite->set_current_animation("walking_with_shield");

    shield_sprite->set_current_animation("walking");
    shield_sprite->set_current_direction(get_animation_direction());
  }
  else {
    tunic_sprite->set_current_animation("walking");
  }
  stop_displaying_sword();
  stop_displaying_trail();
}
Exemplo n.º 6
0
/**
 * \brief Starts the "walking" animation of the hero's sprites with the sword loading.
 */
void HeroSprites::set_animation_walking_sword_loading() {

  set_animation_walking_common();

  int direction = get_animation_direction();

  tunic_sprite->set_current_animation("sword_loading_walking");
  if (equipment.has_ability("sword")) {
    sword_sprite->set_current_animation("sword_loading_walking");
    sword_sprite->set_current_direction(direction);
    sword_stars_sprite->set_current_animation("loading");
    sword_stars_sprite->set_current_direction(direction);
  }

  if (equipment.has_ability("shield")) {
    shield_sprite->set_current_animation("sword_loading_walking");
    shield_sprite->set_current_direction(direction);
  }
  stop_displaying_trail();
}