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

An activity to wait for a predefined duration. More...

#include <gf/Activities.h>

Inheritance diagram for gf::DelayActivity:
Inheritance graph

Public Member Functions

 DelayActivity (Time duration)
 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 wait for a predefined duration.

Constructor & Destructor Documentation

◆ DelayActivity()

gf::DelayActivity::DelayActivity ( Time  duration)


durationThe duration to wait for

Member Function Documentation

◆ restart()

virtual void gf::DelayActivity::restart ( )

Restart the activity.

Reimplemented from gf::Activity.

◆ run()

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

Run the activity.

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

Implements gf::Activity.