SimpleAI
 All Classes Namespaces Files Functions Variables Typedefs Macros Groups Pages
True.h
Go to the documentation of this file.
1 
5 #pragma once
6 
8 
9 namespace ai {
10 
14 class True: public ICondition {
15 public:
17 
18  bool evaluate(const AIPtr& entity) override;
19 };
20 
21 inline bool True::evaluate(const AIPtr& /* entity */) {
22  return true;
23 }
24 
25 }
A condition can be placed on a TreeNode to decide which node is going to get executed. In general they are stateless. If they are not, it should explicitly get noted.
Definition: ICondition.h:124
#define CONDITION_CLASS_SINGLETON(ConditionName)
Macro to create a singleton conditions for very easy conditions without a state.
Definition: ICondition.h:88
bool evaluate(const AIPtr &entity) override
Checks whether the condition evaluates to true for the given entity.
Definition: True.h:21
Condition related stuff.
This condition just always evaluates to true.
Definition: True.h:14