![]() |
Botcraft 1.21.4
|
A Decorator that ticks its child n times (repeat until first success if n == 0). More...
#include <BehaviourTree.hpp>
Public Member Functions | |
Repeater (const std::string &s, const size_t n_) | |
![]() | |
virtual | ~Decorator () |
void | SetChild (std::shared_ptr< Node< Context > > child_) |
virtual BehaviourNodeType | GetNodeType () const override |
virtual size_t | GetNumChildren () const override |
virtual const BaseNode * | GetChild (const size_t index) const override |
![]() | |
virtual | ~Node () |
Status | Tick (Context &context) const |
![]() | |
BaseNode (const std::string &name_) | |
virtual | ~BaseNode () |
std::string | GetFullDescriptor () const |
const std::string & | GetName () const |
std::string | GetClassName () const |
Protected Member Functions | |
virtual Status | TickImpl (Context &context) const override |
![]() | |
Status | TickChild (Context &context) const |
Private Attributes | |
size_t | n |
Additional Inherited Members | |
![]() | |
const std::string | name |
A Decorator that ticks its child n times (repeat until first success if n == 0).
Always returns success.
Context | The tree context type |
Definition at line 365 of file BehaviourTree.hpp.
|
inline |
Definition at line 368 of file BehaviourTree.hpp.
|
inlineoverrideprotectedvirtual |
Implements Botcraft::Node< Context >.
Definition at line 371 of file BehaviourTree.hpp.
References Botcraft::Failure, Botcraft::Repeater< Context >::n, Botcraft::Success, and Botcraft::Decorator< Context >::TickChild().
|
private |
Definition at line 384 of file BehaviourTree.hpp.
Referenced by Botcraft::Repeater< Context >::TickImpl().