Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
Classes | Functions
gf::activity Namespace Reference

Classes

class  AnyActivity
 An activity that can hold any other activity. More...
 
class  ParallelActivityEx
 A gf::ParallelActivity that holds its activities. More...
 
class  RepeatActivityEx
 A gf::RepeatActivity that holds its activity. More...
 
class  SequenceActivityEx
 A gf::SequenceActivity that holds its activities. More...
 

Functions

ValueActivity value (float origin, float target, float &value, Time duration, Easing easing=Ease::linear)
 Create a gf::ValueActivity. More...
 
RotateToActivity rotateTo (float origin, float target, float &angle, Time duration, Easing easing=Ease::linear)
 Create a gf::RotateToActivity. More...
 
MoveToActivity moveTo (Vector2f origin, Vector2f target, Vector2f &position, Time duration, Easing easing=Ease::linear)
 Create a gf::MoveToActivity. More...
 
ColorActivity color (Color4f origin, Color4f target, Color4f &color, Time duration, Easing easing=Ease::linear)
 Create a gf::ColorActivity. More...
 
CallbackActivity call (std::function< void()> callback)
 Create a gf::CallbackActivity. More...
 
DelayActivity delay (Time duration)
 Create a gf::DelayActivity. More...
 
template<typename... Args>
SequenceActivityEx< Args... > sequence (Args... activities)
 
template<typename Other >
RepeatActivityEx< Other > repeat (Other activity, int repeat=0)
 
template<typename... Args>
ParallelActivityEx< Args... > parallelAny (Args... activities)
 Create a gf::ParallelActivityEx. More...
 
template<typename... Args>
ParallelActivityEx< Args... > parallelAll (Args... activities)
 Create a gf::ParallelActivityEx. More...
 

Detailed Description

The namespace for activity creation

Function Documentation

◆ call()

CallbackActivity gf::activity::call ( std::function< void()>  callback)
inline

Create a gf::CallbackActivity.

Parameters
callbackThe function to call

◆ color()

ColorActivity gf::activity::color ( Color4f  origin,
Color4f  target,
Color4f color,
Time  duration,
Easing  easing = Ease::linear 
)
inline

Create a gf::ColorActivity.

Parameters
originThe origin value
targetThe target value
colorA reference on the value
durationThe duration of the tween
easingThe easing for the interpolation

◆ delay()

DelayActivity gf::activity::delay ( Time  duration)
inline

Create a gf::DelayActivity.

Parameters
durationThe duration to wait for

◆ moveTo()

MoveToActivity gf::activity::moveTo ( Vector2f  origin,
Vector2f  target,
Vector2f position,
Time  duration,
Easing  easing = Ease::linear 
)
inline

Create a gf::MoveToActivity.

Parameters
originThe origin value
targetThe target value
positionA reference on the value
durationThe duration of the tween
easingThe easing for the interpolation

◆ parallelAll()

template<typename... Args>
ParallelActivityEx< Args... > gf::activity::parallelAll ( Args...  activities)

Create a gf::ParallelActivityEx.

Parameters
activitiesThe activities in parallel

◆ parallelAny()

template<typename... Args>
ParallelActivityEx< Args... > gf::activity::parallelAny ( Args...  activities)

Create a gf::ParallelActivityEx.

Parameters
activitiesThe activities in parallel

◆ repeat()

template<typename Other >
RepeatActivityEx< Other > gf::activity::repeat ( Other  activity,
int  repeat = 0 
)

Create a gf::RepeatActivityEx.

Parameters
activityThe activity to repeat
repeatThe number of time to repeat the activity or 0 for infinite

◆ rotateTo()

RotateToActivity gf::activity::rotateTo ( float  origin,
float  target,
float &  angle,
Time  duration,
Easing  easing = Ease::linear 
)
inline

Create a gf::RotateToActivity.

Parameters
originThe origin value
targetThe target value
angleA reference on the value
durationThe duration of the tween
easingThe easing for the interpolation

◆ sequence()

template<typename... Args>
SequenceActivityEx< Args... > gf::activity::sequence ( Args...  activities)

Create a gf::SequenceActivityEx.

Parameters
activitiesThe activities of the sequence

◆ value()

ValueActivity gf::activity::value ( float  origin,
float  target,
float &  value,
Time  duration,
Easing  easing = Ease::linear 
)
inline

Create a gf::ValueActivity.

Parameters
originThe origin value
targetThe target value
valueA reference on the value
durationThe duration of the tween
easingThe easing for the interpolation