1
This commit is contained in:
parent
9a3d21800f
commit
ec2f95677f
@ -499,8 +499,11 @@ behaviac::EBTStatus HeroAgent::CoStartMove(float distance)
|
|||||||
);
|
);
|
||||||
auto co = std::make_shared<BtCoroutine>(context, "CoStartMove");
|
auto co = std::make_shared<BtCoroutine>(context, "CoStartMove");
|
||||||
co->runing_cb =
|
co->runing_cb =
|
||||||
[this, context] ()
|
[this, context, distance] ()
|
||||||
{
|
{
|
||||||
|
if (!owner_->dead) {
|
||||||
|
owner_->GetMovement()->CalcTargetPos(distance);
|
||||||
|
}
|
||||||
return behaviac::BT_SUCCESS;
|
return behaviac::BT_SUCCESS;
|
||||||
};
|
};
|
||||||
return StartCoroutine(co);
|
return StartCoroutine(co);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user