1
This commit is contained in:
parent
12cbc18a48
commit
ea45d1b741
@ -121,6 +121,11 @@ behaviac::EBTStatus AndroidAgent::DoAttack()
|
||||
if (status_ == behaviac::BT_RUNNING) {
|
||||
return status_runing_cb_();
|
||||
}
|
||||
Human* enemy = GetOwner()->room->FindEnemy(GetOwner());
|
||||
if (enemy) {
|
||||
return behaviac::BT_FAILURE;
|
||||
}
|
||||
|
||||
a8::Vec2 dir = GetOwner()->GetMoveDir();
|
||||
dir.Rotate((10 + rand() % 360)/ 180.0f);
|
||||
dir.Normalize();
|
||||
|
Loading…
x
Reference in New Issue
Block a user