1
This commit is contained in:
parent
af9c01a306
commit
98ff269651
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "new_base_agent.h"
|
#include "new_base_agent.h"
|
||||||
|
|
||||||
|
#include "room.h"
|
||||||
|
|
||||||
BaseAgent::BaseAgent():behaviac::Agent()
|
BaseAgent::BaseAgent():behaviac::Agent()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -10,3 +12,23 @@ BaseAgent::BaseAgent():behaviac::Agent()
|
|||||||
BaseAgent::~BaseAgent()
|
BaseAgent::~BaseAgent()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool BaseAgent::IsGameOver()
|
||||||
|
{
|
||||||
|
return room->IsGameOver();
|
||||||
|
}
|
||||||
|
|
||||||
|
int BaseAgent::GetTickCount()
|
||||||
|
{
|
||||||
|
return room->GetFrameNo() * FRAME_RATE_MS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int BaseAgent::RandRange(int min_val, int max_val)
|
||||||
|
{
|
||||||
|
return a8::RandEx(min_val, max_val);
|
||||||
|
}
|
||||||
|
|
||||||
|
int BaseAgent::Rand()
|
||||||
|
{
|
||||||
|
return rand();
|
||||||
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "behaviac/behaviac.h"
|
#include "behaviac/behaviac.h"
|
||||||
#include "behaviac_customized_types.h"
|
#include "behaviac_customized_types.h"
|
||||||
|
|
||||||
|
class Room;
|
||||||
class BaseAgent : public behaviac::Agent
|
class BaseAgent : public behaviac::Agent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -16,4 +17,12 @@ public:
|
|||||||
void Exec() {}
|
void Exec() {}
|
||||||
void SetOwner(Creature* owner) { }
|
void SetOwner(Creature* owner) { }
|
||||||
|
|
||||||
|
bool IsGameOver();
|
||||||
|
int GetTickCount();
|
||||||
|
int RandRange(int min_val, int max_val);
|
||||||
|
int Rand();
|
||||||
|
|
||||||
|
public:
|
||||||
|
Room* room = nullptr;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user