Beispiel #1
0
Baseball::Baseball() : Weapon(WEAPON_BASEBALL, "baseball", new BaseballConfig())
{
  UpdateTranslationStrings();

  m_category = DUEL;
  m_weapon_fire = new Sprite(GetResourceManager().LoadImage(weapons_res_profile,m_id+"_fire"));
}
Beispiel #2
0
Mine::Mine() : WeaponLauncher(WEAPON_MINE, "minelauncher", MineConfig::GetInstance())
{
  UpdateTranslationStrings();

  m_category = THROW;
  ReloadLauncher();
}
Beispiel #3
0
Cluzooka::Cluzooka() :
  WeaponLauncher(WEAPON_CLUZOOKA, "cluzooka", new CluzookaConfig())
{
  UpdateTranslationStrings();

  m_category = HEAVY;
  ReloadLauncher();
}
Beispiel #4
0
Suicide::Suicide() : Weapon(WEAPON_SUICIDE, "suicide", new ExplosiveWeaponConfig())
{
  UpdateTranslationStrings();
  // The m_time_between_each_shot gets used here
  // to prevent that the weapon gets deselected before the character explodes.
  m_time_between_each_shot = SUICIDE_SOUND_DURATION_IN_MS;
  m_category = DUEL;
}
Beispiel #5
0
FootBombLauncher::FootBombLauncher() :
  WeaponLauncher(WEAPON_FOOTBOMB, "footbomb", new FootBombConfig())
{
  UpdateTranslationStrings();

  m_category = THROW;
  ignore_collision_signal = true;
  ReloadLauncher();
}
Beispiel #6
0
ClusterLauncher::ClusterLauncher() :
  WeaponLauncher(WEAPON_CLUSTER_BOMB, "cluster_bomb", new ClusterBombConfig())
{
  UpdateTranslationStrings();

  m_category = THROW;
  ignore_collision_signal = true;
  ReloadLauncher();
}
Beispiel #7
0
LowGrav::LowGrav() :
  Weapon(WEAPON_LOWGRAV, "lowgrav", new WeaponConfig(), false),
  active(false)
{
  UpdateTranslationStrings();

  m_category = MOVE;

  use_unit_on_first_shoot = false;
}
Beispiel #8
0
DiscoGrenadeLauncher::DiscoGrenadeLauncher() :
  WeaponLauncher(WEAPON_DISCO_GRENADE, "disco_grenade", new ExplosiveWeaponConfig())
{
  UpdateTranslationStrings();

  m_category = THROW;
  m_allow_change_timeout = true;
  ignore_collision_signal = true;
  ReloadLauncher();
}
Beispiel #9
0
Parachute::Parachute() : Weapon(WEAPON_PARACHUTE, "parachute", new ParachuteConfig(), false)
{
  UpdateTranslationStrings();

  m_category = MOVE;
  m_initial_nb_ammo = 2;
  use_unit_on_first_shoot = false;
  m_used_this_turn = false;
  img = GetResourceManager().LoadSprite(weapons_res_profile, "parachute_sprite");
}
Beispiel #10
0
AirAttack::AirAttack() :
  Weapon(WEAPON_AIR_ATTACK, "air_attack",new AirAttackConfig())//, plane(cfg())
{
  UpdateTranslationStrings();

  m_category = HEAVY;
  mouse_character_selection = false;
  can_be_used_on_closed_map = false;
  target_chosen = false;
  m_time_between_each_shot = 100;
}
Beispiel #11
0
Blowtorch::Blowtorch() :
  Weapon(WEAPON_BLOWTORCH, "blowtorch", new BlowtorchConfig()),
  active(false)
{
  UpdateTranslationStrings();

  m_category = TOOL;
  m_time_between_each_shot = MIN_TIME_BETWEEN_DIG;
  m_weapon_fire = new Sprite(GetResourceManager().LoadImage(weapons_res_profile, "blowtorch_fire"));
  m_can_change_weapon = true;
}
Beispiel #12
0
Airhammer::Airhammer():
  Weapon(WEAPON_AIR_HAMMER, "airhammer", new AirhammerConfig()),
  active(false),
  deactivation_requested(false)
{
  UpdateTranslationStrings();

  m_category = TOOL;

  impact = GetResourceManager().LoadImage( weapons_res_profile, "airhammer_impact");
  m_time_between_each_shot = MIN_TIME_BETWEEN_JOLT;
  m_can_change_weapon = true;
}
Beispiel #13
0
JetPack::JetPack() : Weapon(WEAPON_JETPACK, "jetpack",
                            new WeaponConfig(),
                            false)
{
  UpdateTranslationStrings();

  m_category = MOVE;

  use_unit_on_first_shoot = false;

  m_flying = false;
  active = false;
}
Beispiel #14
0
PolecatLauncher::PolecatLauncher() :
  WeaponLauncher(WEAPON_POLECAT, "polecatlauncher", new ExplosiveWeaponConfig()),
  current_polecat(NULL),
  polecat_death_time(0)
{
  UpdateTranslationStrings();

  m_category = SPECIAL;
  ReloadLauncher();

  // unit will be used when the polecat disappears
  use_unit_on_first_shoot = false;
}
Beispiel #15
0
Construct::Construct() : Weapon(WEAPON_CONSTRUCT, "construct",
                                new WeaponConfig(),
                                false)
{
  UpdateTranslationStrings();

  construct_spr = GetResourceManager().LoadSprite( weapons_res_profile, "construct_spr");
  // The 12 is the result of (TWO * PI) / DELTA_ANGLE
  construct_spr->EnableCaches(false, 12);
  m_name = _("Construct");
  m_category = TOOL;
  m_can_change_weapon = true;
  angle = 0;
  target_chosen = false;
}
Beispiel #16
0
TuxLauncher::TuxLauncher()
  : WeaponLauncher(WEAPON_SUPERTUX, "tux", new SuperTuxWeaponConfig())
{
  UpdateTranslationStrings();

  m_category = SPECIAL;
  current_tux = NULL;
  tux_death_time = 0;
  ReloadLauncher();

  // unit will be used when the supertux disappears
  use_unit_on_first_shoot = false;

  // Supertux doesn't drown! it swims!
  ignore_drowning_signal = true;
}
Beispiel #17
0
Grapple::Grapple() :
  Weapon(WEAPON_GRAPPLE, "grapple", new GrappleConfig())
{
  UpdateTranslationStrings();

  m_category = MOVE;
  use_unit_on_first_shoot = false;

  m_hook_sprite = GetResourceManager().LoadSprite(weapons_res_profile,"grapple_hook");
  m_hook_sprite->EnableCaches(false, 32);
  m_node_sprite = GetResourceManager().LoadSprite(weapons_res_profile,"grapple_node");

  attached = false;
  go_left = false;
  go_right = false;
  delta_len = 0;
  move_left_pressed = false;
  move_right_pressed = false;
  move_up_pressed = false;
  move_down_pressed = false;
}
Beispiel #18
0
Syringe::Syringe() : Weapon(WEAPON_SYRINGE, "syringe", new SyringeConfig())
{
  UpdateTranslationStrings();

  m_category = DUEL;
}
Beispiel #19
0
Slap::Slap() : Weapon(WEAPON_SLAP, "slap", new SlapConfig())
{
  UpdateTranslationStrings();

  m_category = DUEL;
}