move random for rpg strategy

This commit is contained in:
Yunfan Li
2023-10-26 21:05:23 +08:00
parent 0a0ad09125
commit 83e62b4cd3
2 changed files with 24 additions and 6 deletions

View File

@@ -32,6 +32,7 @@ NextAction** RpgStrategy::getDefaultActions()
void RpgStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
{
triggers.push_back(new TriggerNode("no rpg target", NextAction::array(0, new NextAction("choose rpg target", 5.0f), nullptr)));
triggers.push_back(new TriggerNode("no rpg target", NextAction::array(0, new NextAction("move random", 1.10f), NULL)));
triggers.push_back(new TriggerNode("far from rpg target", NextAction::array(0, new NextAction("move to rpg target", 5.0f), nullptr)));
//Sub actions