context decorator for a tree of contexts More...
Public Member Functions | |
HierarchicalContext (IContext self, IContext parent) | |
bool | HasContext< T > (Object key) |
T | GetContext< T > (Object key) |
Public Member Functions inherited from TenPN.DecisionFlex.IContext | |
bool | HasContext< T > (object key) |
T | GetContext< T > (object key) |
context decorator for a tree of contexts
the weapon selection demo uses one context per enemy, with each parented to a master context that contains inventory context.
|
inline |
self | the first context to check for a key in. |
parent | the context to defer to if self doesn't contain the key. can be null. |
|
inline |
fetches from self first, and parent if not found
|
inline |
true if key in self, or parent