Middle Europe Productions Library  alpha 1.3.3
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
MEPtools::AnimationDelay Class Reference

#include <AnimationDelay.h>

Inheritance diagram for MEPtools::AnimationDelay:
MEP::Animation MEP::AnimationObject MEP::AnimationPosition MEP::Button MEP::AnimationColor

Public Member Functions

void setDelay (const sf::Time &delay, bool permaDelay=false)
 
void setEntryDelay (const sf::Time &delay)
 
void setExitDelay (const sf::Time &delay)
 
void setLowEntryDelay (const sf::Time &delay)
 
void setLowExitDelay (const sf::Time &delay)
 
void setGeneralDelay (const sf::Time &delay, bool permaDelay=false)
 
void resetDelay ()
 

Protected Types

enum  State {
  State::Entry, State::Exit, State::Base, State::LowExit,
  State::LowEntry
}
 

Protected Member Functions

const sf::Time & delay () const
 
bool updateDelay (const sf::Time &currentTime)
 
void newCycle ()
 
void changeState (State newState)
 

Protected Attributes

State state = State::Base
 

Member Enumeration Documentation

◆ State

enum MEPtools::AnimationDelay::State
strongprotected
Enumerator
Entry 
Exit 
Base 
LowExit 
LowEntry 

Member Function Documentation

◆ changeState()

void MEPtools::AnimationDelay::changeState ( State  newState)
inlineprotected

Changes the protected state of the delay.

◆ delay()

const sf::Time& MEPtools::AnimationDelay::delay ( ) const
inlineprotected

Outputs the delay.

◆ newCycle()

void MEPtools::AnimationDelay::newCycle ( )
inlineprotected

Creates a new cycle.

◆ resetDelay()

void MEPtools::AnimationDelay::resetDelay ( )
inline

Resetes the delays.

◆ setDelay()

void MEPtools::AnimationDelay::setDelay ( const sf::Time &  delay,
bool  permaDelay = false 
)
inline

Sets the delay of an animation. Delay is a time to wait from starting the animation.

Parameters
[in]delayDelay to be applied on the animation.
[in]premaDelayIf false the delay will be applied once otherwise it will be applied always when run() is called.

◆ setEntryDelay()

void MEPtools::AnimationDelay::setEntryDelay ( const sf::Time &  delay)
inline

Sets the delay of an animation then Entrance state. Delay is a time to wait from starting the animation.

Parameters
[in]delayDelay to be applied on the animation on Entrance.

◆ setExitDelay()

void MEPtools::AnimationDelay::setExitDelay ( const sf::Time &  delay)
inline

Sets the delay of an animation then Exit state. Delay is a time to wait from starting the animation.

Parameters
[in]delayDelay to be applied on the animation on Exit.

◆ setGeneralDelay()

void MEPtools::AnimationDelay::setGeneralDelay ( const sf::Time &  delay,
bool  permaDelay = false 
)
inline

Sets the delay of an animation in every state of the window. Delay is a time to wait from starting the animation.

Parameters
[in]delayDelay to be applied on the animation on every state.
[in]premaDelayIf false the delay will be applied once otherwise it will be applied always when run() is called (Only in Base state).

◆ setLowEntryDelay()

void MEPtools::AnimationDelay::setLowEntryDelay ( const sf::Time &  delay)
inline

Sets the delay of an animation then Entrance state. Delay is a time to wait from starting the animation.

Parameters
[in]delayDelay to be applied on the animation on Entrance.

◆ setLowExitDelay()

void MEPtools::AnimationDelay::setLowExitDelay ( const sf::Time &  delay)
inline

Sets the delay of an animation then Exit state. Delay is a time to wait from starting the animation.

Parameters
[in]delayDelay to be applied on the animation on Exit.

◆ updateDelay()

bool MEPtools::AnimationDelay::updateDelay ( const sf::Time &  currentTime)
inlineprotected

Updates the delay.

Member Data Documentation

◆ state

State MEPtools::AnimationDelay::state = State::Base
protected

Delay state.