dungeon/src/RestNode.cpp

16 lines
349 B
C++
Raw Normal View History

2017-09-17 13:43:13 +02:00
#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;
}