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

An activity to run an activity several times. More...

#include <gf/Activities.h>

Inheritance diagram for gf::RepeatActivity:
Inheritance graph

Public Member Functions

 RepeatActivity (Activity &activity, unsigned repeat=0)
 Constructor. 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 an activity several times.

Constructor & Destructor Documentation

◆ RepeatActivity()

gf::RepeatActivity::RepeatActivity ( Activity activity,
unsigned  repeat = 0 


activityThe activity to run serveral times
repeatThe number of time to repeat the activity or 0 for infinite

Member Function Documentation

◆ restart()

virtual void gf::RepeatActivity::restart ( )

Restart the activity.

Reimplemented from gf::Activity.

◆ run()

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

Run the activity.

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

Implements gf::Activity.