EndSequenceFireworks Class Reference

#include <endsequence_fireworks.hpp>

Inherits EndSequence.

List of all members.

Public Member Functions

 EndSequenceFireworks ()
virtual ~EndSequenceFireworks ()
virtual void draw (DrawingContext &context)
 The GameObject should draw itself onto the provided DrawingContext if this function is called.

Protected Member Functions

virtual void starting ()
 called when EndSequence starts
virtual void running (float elapsed_time)
 called while the EndSequence is running
virtual void stopping ()
 called when EndSequence stops

Protected Attributes

Timer endsequence_timer


Detailed Description

Definition at line 23 of file endsequence_fireworks.hpp.


Constructor & Destructor Documentation

EndSequenceFireworks::EndSequenceFireworks (  ) 

Definition at line 24 of file endsequence_fireworks.cpp.

00024                                            :
00025   EndSequence(),
00026   endsequence_timer()
00027 {
00028 }

EndSequenceFireworks::~EndSequenceFireworks (  )  [virtual]

Definition at line 30 of file endsequence_fireworks.cpp.

00031 {
00032 }


Member Function Documentation

void EndSequenceFireworks::draw ( DrawingContext context  )  [virtual]

The GameObject should draw itself onto the provided DrawingContext if this function is called.

Reimplemented from EndSequence.

Definition at line 35 of file endsequence_fireworks.cpp.

00036 {
00037 }

void EndSequenceFireworks::starting (  )  [protected, virtual]

called when EndSequence starts

Reimplemented from EndSequence.

Definition at line 40 of file endsequence_fireworks.cpp.

References Sector::add_object(), Sector::current(), endsequence_timer, g_screen_manager, ScreenManager::get_speed(), Timer::start(), and EndSequence::starting().

00041 {
00042   EndSequence::starting();
00043   endsequence_timer.start(7.3f * g_screen_manager->get_speed());
00044   Sector::current()->add_object(new Fireworks());
00045 }

void EndSequenceFireworks::running ( float  elapsed_time  )  [protected, virtual]

called while the EndSequence is running

Reimplemented from EndSequence.

Definition at line 48 of file endsequence_fireworks.cpp.

References Timer::check(), EndSequence::end_sequence_controller, endsequence_timer, EndSequence::isdone, Controller::JUMP, CodeController::press(), EndSequence::running(), and EndSequence::tux_may_walk.

00049 {
00050   EndSequence::running(elapsed_time);
00051   //Player& tux = *Sector::current()->player;
00052 
00053   if (tux_may_walk) {
00054     end_sequence_controller->press(Controller::JUMP);
00055   }
00056 
00057   if (endsequence_timer.check()) isdone = true;
00058 }

void EndSequenceFireworks::stopping (  )  [protected, virtual]

called when EndSequence stops

Reimplemented from EndSequence.

Definition at line 61 of file endsequence_fireworks.cpp.

References EndSequence::stopping().

00062 {
00063   EndSequence::stopping();
00064 }


Member Data Documentation

Timer EndSequenceFireworks::endsequence_timer [protected]

Definition at line 35 of file endsequence_fireworks.hpp.

Referenced by running(), and starting().


The documentation for this class was generated from the following files:
Generated on Mon Jun 9 03:38:30 2014 for SuperTux by  doxygen 1.5.1