1
This commit is contained in:
parent
d1772dd4b7
commit
9484b8dc14
@ -36,3 +36,18 @@ behaviac::EBTStatus BaseAgent::DoRunningCb()
|
||||
}
|
||||
return status_;
|
||||
}
|
||||
|
||||
|
||||
behaviac::EBTStatus BaseAgent::CoAttackTarget(int target_id)
|
||||
{
|
||||
if (status_ == behaviac::BT_RUNNING) {
|
||||
return DoRunningCb();
|
||||
}
|
||||
status_runing_cb_ =
|
||||
[this] () mutable
|
||||
{
|
||||
return status_;
|
||||
};
|
||||
status_ = behaviac::BT_RUNNING;
|
||||
return status_;
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ public:
|
||||
bool IsGameOver();
|
||||
bool HasTarget(float range);
|
||||
|
||||
behaviac::EBTStatus CoAttackTarget(int target_id);
|
||||
|
||||
public:
|
||||
void SetOwner(Creature* owner) { owner_ = owner; };
|
||||
Creature* GetOwner() { return owner_; };
|
||||
|
Loading…
x
Reference in New Issue
Block a user