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

A game activity. More...

#include <gf/Activity.h>

Inheritance diagram for gf::Activity:
Inheritance graph

Public Member Functions

virtual ~Activity ()
 Destructor. More...
virtual ActivityStatus run (Time time)=0
 Run the activity. More...
virtual void restart ()
 Restart the activity. More...

Detailed Description

A game activity.

An activity is a task that can be run over time. gf provides predefined activites but you can also add your own activities.

Here is a list of predefined activites:

Constructor & Destructor Documentation

◆ ~Activity()

virtual gf::Activity::~Activity ( )


Member Function Documentation

◆ restart()

virtual void gf::Activity::restart ( )

◆ run()

virtual ActivityStatus gf::Activity::run ( Time  time)
pure virtual

Run the activity.

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

Implemented in gf::ParallelActivity, gf::RepeatActivity, gf::SequenceActivity, gf::DelayActivity, gf::CallbackActivity, gf::ColorActivity, gf::MoveToActivity, gf::RotateToActivity, and gf::ValueActivity.