TuxLauncher Class Reference

#include <supertux.h>

Inheritance diagram for TuxLauncher:

Inheritance graph
[legend]
Collaboration diagram for TuxLauncher:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TuxLauncher ()
void HandleKeyEvent (Action::Action_t action, Keyboard::Key_Event_t event_type)

Protected Member Functions

WeaponProjectileGetProjectileInstance ()
bool p_Shoot ()

Private Member Functions

SuperTuxWeaponConfigcfg ()

Private Attributes

SuperTuxcurrent_tux

Detailed Description

Definition at line 65 of file supertux.h.


Constructor & Destructor Documentation

TuxLauncher::TuxLauncher (  ) 

Definition at line 124 of file supertux.cpp.

00124                          :
00125   WeaponLauncher(WEAPON_SUPERTUX, "tux", new SuperTuxWeaponConfig(), VISIBLE_ONLY_WHEN_INACTIVE)
00126 {
00127   m_name = _("SuperTux");
00128   override_keys = true ;
00129   ReloadLauncher();
00130 }

Here is the call graph for this function:


Member Function Documentation

SuperTuxWeaponConfig & TuxLauncher::cfg (  )  [private]

Reimplemented from WeaponLauncher.

Definition at line 163 of file supertux.cpp.

00164 {
00165   return static_cast<SuperTuxWeaponConfig&>(*extra_params);
00166 }

Here is the caller graph for this function:

WeaponProjectile * TuxLauncher::GetProjectileInstance (  )  [protected, virtual]

Implements WeaponLauncher.

Definition at line 132 of file supertux.cpp.

00133 {
00134   return dynamic_cast<WeaponProjectile *>
00135       (new SuperTux(cfg(),dynamic_cast<WeaponLauncher *>(this)));
00136 }

Here is the call graph for this function:

void TuxLauncher::HandleKeyEvent ( Action::Action_t  action,
Keyboard::Key_Event_t  event_type 
) [virtual]

Reimplemented from WeaponLauncher.

Definition at line 144 of file supertux.cpp.

00145 {
00146   switch (action)
00147   {
00148     case Action::ACTION_MOVE_LEFT:
00149     if (event_type !=  Keyboard:: Keyboard::KEY_RELEASED)
00150       current_tux->turn_left();
00151     break ;
00152 
00153     case Action::ACTION_MOVE_RIGHT:
00154     if (event_type !=  Keyboard:: Keyboard::KEY_RELEASED)
00155       current_tux->turn_right();
00156     break ;
00157 
00158   default:
00159     break ;
00160   } ;
00161 }

Here is the call graph for this function:

bool TuxLauncher::p_Shoot (  )  [protected, virtual]

Reimplemented from WeaponLauncher.

Definition at line 138 of file supertux.cpp.

00139 {
00140   current_tux = static_cast<SuperTux *>(projectile);
00141   return WeaponLauncher::p_Shoot();
00142 }

Here is the call graph for this function:


Member Data Documentation

SuperTux* TuxLauncher::current_tux [private]

Definition at line 68 of file supertux.h.


The documentation for this class was generated from the following files:
Generated on Mon Jan 1 14:27:33 2007 for Wormux by  doxygen 1.4.7