1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00
OpenMW/apps/openmw/mwworld/action.hpp

41 lines
824 B
C++
Raw Normal View History

2010-08-03 18:20:15 +02:00
#ifndef GAME_MWWORLD_ACTION_H
#define GAME_MWWORLD_ACTION_H
#include <string>
#include "ptr.hpp"
2010-08-03 18:20:15 +02:00
namespace MWWorld
{
/// \brief Abstract base for actions
class Action
{
std::string mSoundId;
2012-08-26 18:50:47 +02:00
bool mTeleport;
Ptr mTarget;
2010-08-03 18:20:15 +02:00
// not implemented
Action (const Action& action);
Action& operator= (const Action& action);
2012-07-27 12:00:10 +02:00
virtual void executeImp (const Ptr& actor) = 0;
protected:
const Ptr& getTarget() const;
public:
2010-08-03 18:20:15 +02:00
Action (bool teleport = false, const Ptr& target = Ptr());
2012-08-26 18:50:47 +02:00
///< \param teleport action will teleport the actor
2010-08-03 18:20:15 +02:00
2012-07-27 12:00:10 +02:00
virtual ~Action();
2010-08-03 18:20:15 +02:00
2012-07-27 12:00:10 +02:00
void execute (const Ptr& actor);
void setSound (const std::string& id);
2010-08-03 18:20:15 +02:00
};
}
#endif