Transition Class Reference

Base class for a transition. More...

#include <Game/TransitionEffect.h>

Inherited by TransitionDelay, TransitionIn, and TransitionOut.

List of all members.

Public Types

enum  TransitionType {
  TRANSITION_UNKNOWN = -1, TRANSITION_OUT = 0, TRANSITION_DELAY, TRANSITION_IN,
  TRANSITION_COUNT
}
 

Declares the differant type of transitions.

More...

Public Member Functions

 Transition ()
 Constructor.
 Transition (float time)
 Constructor.
virtual ~Transition ()
 Deconstructor.
virtual TransitionType GetType () const
 Returns the type of the transition.
void SetTransitionTime (float time)
 Sets the transition time.
void SetArea (const Rectf &rec)
 Sets the area that the transition must cover.
float GetTransitionTime ()
 Gets the transition time.
float GetTimeLeft () const
 Returns the time left in the transition.
bool IsComplete () const
 Returns true if the transition is complete.
float GetCompletionPercent () const
 Returns a value in the range [0,1].
void SetCompletionPercent (float t)
 Sets the completion percentage.
void Reset ()
 Reset the transition.
void ForceCompletion ()
 Forces the transition to be completed.
void Update (float dt)
 Updates the transition.
void Draw ()
 Draws the transition.

Protected Member Functions

virtual void OnDraw (float t, const Rectf &r)=0
 Internal draw method.

Detailed Description

Base class for a transition.

Transitions are expected to cover the entire given rectangle.


Member Enumeration Documentation

Declares the differant type of transitions.

Enumerator:
TRANSITION_UNKNOWN 

Unknown transition type.

TRANSITION_OUT 

Transition out.

TRANSITION_DELAY 

Transition delay between a transition out and in.

TRANSITION_IN 

Transition in.

TRANSITION_COUNT 

The number of transition types.


Constructor & Destructor Documentation

Transition::Transition ( float  time  ) 

Constructor.

Parameters:
[in] time the transition time.

Member Function Documentation

virtual void Transition::OnDraw ( float  t,
const Rectf r 
) [protected, pure virtual]

Internal draw method.

Parameters:
[in] t the completion percentage in the range [0,1].
[in] r the area to cover.

Implemented in AlphaFadeOutTransition, AlphaFadeInTransition, SolidColorDelayTransition, SlantedSlideOutTransition, and SlantedSlideInTransition.

void Transition::SetCompletionPercent ( float  t  ) 

Sets the completion percentage.

Parameters:
[in] t a value in the range [0,1].

The documentation for this class was generated from the following files:
Generated on Mon Apr 5 19:08:06 2010 for BrickOut |ReDuX| by  doxygen 1.6.3