dungeon/src/RestNode.cpp
2017-09-17 14:45:57 +02:00

15 lines
349 B
C++

#include "RestNode.h"
#include "BehaviourTree.h"
#include "Actor.h"
RestNode::RestNode(BehaviourTreeNode * parent) : BehaviourTreeNode(parent) {}
RestNode::~RestNode() {}
BehaviourTreeStatus RestNode::tick(BTTick * tick) {
if (tick->target->health < tick->target->maxhealth) {
return BT_SUCCEEDED;
}
return BT_FAILED;
}