mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Feature #391 Dummy AI package classes
This commit is contained in:
parent
96dd399457
commit
99ddc63e2c
22
apps/openmw/mwmechanics/aifollow.cpp
Normal file
22
apps/openmw/mwmechanics/aifollow.cpp
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#include "aifollow.hpp"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
MWMechanics::AiFollow::AiFollow(const std::string &ActorID,float duration, float X, float Y, float Z):
|
||||||
|
mActorID(ActorID), mDuration(duration), mX(X), mY(Y), mZ(Z)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
MWMechanics::AiFollow *MWMechanics::AiFollow::clone() const
|
||||||
|
{
|
||||||
|
return new AiFollow(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool MWMechanics::AiFollow::execute (const MWWorld::Ptr& actor)
|
||||||
|
{
|
||||||
|
std::cout << "AiFollow completed.\n";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int MWMechanics::AiFollow::getTypeId() const
|
||||||
|
{
|
||||||
|
return 3;
|
||||||
|
}
|
27
apps/openmw/mwmechanics/aifollow.hpp
Normal file
27
apps/openmw/mwmechanics/aifollow.hpp
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#ifndef GAME_MWMECHANICS_AIFALLOW_H
|
||||||
|
#define GAME_MWMECHANICS_AIFALLOW_H
|
||||||
|
|
||||||
|
#include "aipackage.hpp"
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace MWMechanics
|
||||||
|
{
|
||||||
|
|
||||||
|
class AiFollow : AiPackage
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
AiFollow(const std::string &ActorID,float duration, float X, float Y, float Z);
|
||||||
|
virtual AiFollow *clone() const;
|
||||||
|
virtual bool execute (const MWWorld::Ptr& actor);
|
||||||
|
///< \return Package completed?
|
||||||
|
virtual int getTypeId() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
float mDuration;
|
||||||
|
float mX;
|
||||||
|
float mY;
|
||||||
|
float mZ;
|
||||||
|
std::string mActorID;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
x
Reference in New Issue
Block a user