25 lines
532 B
C++
25 lines
532 B
C++
#pragma once
|
|
|
|
#include "behaviac/behaviac.h"
|
|
#include "behaviac_customized_types.h"
|
|
|
|
struct BtContext;
|
|
class BaseAgent;
|
|
struct BtCoroutine
|
|
{
|
|
std::shared_ptr<BtContext> context;
|
|
const char* name = nullptr;
|
|
std::function<behaviac::EBTStatus()> runing_cb;
|
|
long long sleep_end_frameno = 0;
|
|
int sleep_time = 0;
|
|
|
|
BtCoroutine(std::shared_ptr<BtContext> context, const char* name)
|
|
{
|
|
this->context = context;
|
|
this->name = name;
|
|
}
|
|
|
|
bool HasEvent();
|
|
void FireEvent(BaseAgent* agent);
|
|
};
|