CUGL 1.3
Cornell University Game Library
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
CUPriorityNode.h
1 //
2 // CUPriorityNode.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 by highest 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_PRIORITY_NODE_H__
38 #define __CU_PRIORITY_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 PriorityNode : public CompositeNode {
64 #pragma mark Constructors
65 public:
72  PriorityNode() : CompositeNode() { _classname = "PriorityNode"; };
73 
78 
79 #pragma mark -
80 #pragma mark Internal Helpers
81 protected:
90  virtual int selectChild() const override;
91 };
92 
93  }
94 }
95 #endif /* __CU_PRIORITY_NODE_H__ */
cugl::ai::BehaviorNode::_classname
std::string _classname
Definition: CUBehaviorNode.h:306
cugl::ai::PriorityNode::selectChild
virtual int selectChild() const override
cugl::ai::PriorityNode::PriorityNode
PriorityNode()
Definition: CUPriorityNode.h:72
cugl::ai::PriorityNode
Definition: CUPriorityNode.h:63
cugl::ai::PriorityNode::~PriorityNode
~PriorityNode()
Definition: CUPriorityNode.h:77
cugl::ai::CompositeNode::dispose
virtual void dispose() override
cugl::ai::CompositeNode
Definition: CUCompositeNode.h:64