CUGL 1.3
Cornell University Game Library
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
CUSelectorNode.h
1 //
2 // CUSelectorNode.h
3 // Cornell University Game Library (CUGL)
4 //
5 // This module provides support for a priority composite behavior node. It
6 // selects a single node which is the first of nonzero priority.
7 //
8 // BehaviorNode objects are managed by BehaviorManager, and should never
9 // be allocated directly. Instead, you create a behavior node definition
10 // and pass it to a factor method in BehaviorManager.
11 //
12 // EXPERIMENTAL: This module is experimental. The API may change significantly
13 // in future CUGL releases.
14 //
15 // CUGL MIT License:
16 // This software is provided 'as-is', without any express or implied
17 // warranty. In no event will the authors be held liable for any damages
18 // arising from the use of this software.
19 //
20 // Permission is granted to anyone to use this software for any purpose,
21 // including commercial applications, and to alter it and redistribute it
22 // freely, subject to the following restrictions:
23 //
24 // 1. The origin of this software must not be misrepresented; you must not
25 // claim that you wrote the original software. If you use this software
26 // in a product, an acknowledgment in the product documentation would be
27 // appreciated but is not required.
28 //
29 // 2. Altered source versions must be plainly marked as such, and must not
30 // be misrepresented as being the original software.
31 //
32 // 3. This notice may not be removed or altered from any source distribution.
33 //
34 // Author: Apurv Sethi and Andrew Matsumoto (with Walker White)
35 // Version: 5/21/2018
36 //
37 #ifndef __CU_SELECTOR_NODE_H__
38 #define __CU_SELECTOR_NODE_H__
39 #include <cugl/ai/behavior/CUCompositeNode.h>
40 #include <string>
41 #include <vector>
42 
43 namespace cugl {
44  namespace ai {
45 
63 class SelectorNode : public CompositeNode {
64 #pragma mark Constructors
65 public:
72  SelectorNode() : CompositeNode() { _classname = "SelectorNode"; };
73 
78 
79 #pragma mark -
80 #pragma mark Internal Helpers
81 
89  virtual int selectChild() const override;
90 };
91 
92  }
93 }
94 #endif /* __CU_SELECTOR_NODE_H__ */
cugl::ai::BehaviorNode::_classname
std::string _classname
Definition: CUBehaviorNode.h:306
cugl::ai::SelectorNode::SelectorNode
SelectorNode()
Definition: CUSelectorNode.h:72
cugl::ai::SelectorNode::~SelectorNode
~SelectorNode()
Definition: CUSelectorNode.h:77
cugl::ai::SelectorNode::selectChild
virtual int selectChild() const override
cugl::ai::SelectorNode
Definition: CUSelectorNode.h:63
cugl::ai::CompositeNode::dispose
virtual void dispose() override
cugl::ai::CompositeNode
Definition: CUCompositeNode.h:64