mirror of https://github.com/OpenMW/openmw.git
added action interface
parent
239498bcd4
commit
c38b02bd5c
@ -0,0 +1,25 @@
|
||||
#ifndef GAME_MWWORLD_ACTION_H
|
||||
#define GAME_MWWORLD_ACTION_H
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
class Environment;
|
||||
|
||||
/// \brief Abstract base for actions
|
||||
class Action
|
||||
{
|
||||
// not implemented
|
||||
Action (const Action& action);
|
||||
Action& operator= (const Action& action);
|
||||
|
||||
public:
|
||||
|
||||
Action() {}
|
||||
|
||||
virtual ~Action() {}
|
||||
|
||||
virtual void execute (Environment& environment) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,17 @@
|
||||
#ifndef GAME_MWWORLD_NULLACTION_H
|
||||
#define GAME_MWWORLD_NULLACTION_H
|
||||
|
||||
#include "action.hpp"
|
||||
|
||||
namespace MWWorld
|
||||
{
|
||||
/// \brief Action: do nothing
|
||||
class NullAction : public Action
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void execute (Environment& environment) {}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue