MekaDragon::MekaDragon(const char *fn, MediaDB *media, int x, int y, Direction dir) : Monster(fn, media, x, y, dir), m_horizontal_dir(HorizontalForward), m_bullet_index(0), m_attack_now(false) { set_always_visible(true); const char* bullet_name = get_string("bullet"); int num_bullets = get_attribute("num_bullets"); for (int i = 0; i < num_bullets; i++) { VectorBullet *bullet = new VectorBullet(bullet_name, media); if (!bullet->get_loaded()) { exit(1); } m_bullets.push_back(bullet); } }
MummyDragon::MummyDragon(const char *fn, MediaDB *media, int x, int y, Direction dir) : Monster(fn, media, x, y, dir), m_bullet_index(0), m_is_flying(false) { set_always_visible(true); const char* bullet_name = get_string("bullet"); int num_bullets = get_attribute("num_bullets"); m_left = get_left() + get_attribute("turn_left"); m_right = get_right() + get_attribute("turn_right"); m_top = m_y + get_attribute("fly_top"); m_bottom = m_y; m_attack_timer.enable(false); for (int i = 0; i < num_bullets; i++) { VectorBullet *bullet = new VectorBullet(bullet_name, media); if (!bullet->get_loaded()) { exit(1); } m_bullets.push_back(bullet); } }