Gamedev Framework (gf)  0.11.0
A C++14 framework for 2D games
Public Member Functions | List of all members
gf::SequenceActivity Class Reference

An activity to run several activities sequentially. More...

#include <gf/Activities.h>

Inheritance diagram for gf::SequenceActivity:
Inheritance graph

Public Member Functions

 SequenceActivity ()
 Constructor. More...
void addActivity (Activity &activity)
 Add an activity to the sequence. More...
void clear ()
 Remove all the activities. More...
virtual ActivityStatus run (Time time) override
 Run the activity. More...
virtual void restart () override
 Restart the activity. More...
- Public Member Functions inherited from gf::Activity
virtual ~Activity ()
 Destructor. More...

Detailed Description

An activity to run several activities sequentially.

Constructor & Destructor Documentation

◆ SequenceActivity()

gf::SequenceActivity::SequenceActivity ( )


Member Function Documentation

◆ addActivity()

void gf::SequenceActivity::addActivity ( Activity activity)

Add an activity to the sequence.

activityThe activity

◆ clear()

void gf::SequenceActivity::clear ( )

Remove all the activities.

◆ restart()

virtual void gf::SequenceActivity::restart ( )

Restart the activity.

Reimplemented from gf::Activity.

◆ run()

virtual ActivityStatus gf::SequenceActivity::run ( Time  time)

Run the activity.

timeThe time since the last run
The status of the activity (running or finished)

Implements gf::Activity.