Example #1
0
/**
 * \brief Creates a state.
 *
 * This constructor can be called only from the subclasses.
 *
 * \param hero The hero to control with this state.
 * \param state_name A name describing this state.
 */
Hero::State::State(Hero& hero, const std::string& state_name):
  hero(hero),
  suspended(false),
  when_suspended(0),
  map(&hero.get_map()),
  name(state_name) {

}
Example #2
0
/**
 * @brief Creates a state.
 *
 * This constructor can be called only from the subclasses.
 *
 * @param hero the hero to control with this state
 */
Hero::State::State(Hero &hero):

  map(&hero.get_map()),
  hero(hero),
  suspended(false),
  when_suspended(0) {

}