BVB Source Codes

CRYENGINE Show Sequence.h Source code

Return Download CRYENGINE: download Sequence.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #pragma once
  4.  
  5. #ifndef Sequence_h
  6.         #define Sequence_h
  7.  
  8.         #include <CryAISystem/IAIActionSequence.h>
  9.  
  10. namespace AIActionSequence
  11. {
  12.  
  13. class Sequence
  14. {
  15. public:
  16.         Sequence(EntityId entityId, SequenceId sequenceId, TFlowNodeId startFlowNodeId, SequenceProperties sequenceProperties, IFlowGraph* flowgraph)
  17.                 : m_entityId(entityId)
  18.                 , m_sequenceId(sequenceId)
  19.                 , m_startNodeId(startFlowNodeId)
  20.                 , m_sequenceProperties(sequenceProperties)
  21.                 , m_flowGraph(flowgraph)
  22.                 , m_active(false)
  23.                 , m_sequenceBehaviorReady(false)
  24.                 , m_currentActionNodeId(InvalidFlowNodeId)
  25.                 , m_bookmarkNodeId(0)
  26.         {}
  27.  
  28.         bool       TraverseAndValidateSequence();
  29.         void       Start();
  30.         void       PrepareAgentSequenceBehavior();
  31.         void       SequenceBehaviorReady();
  32.         void       SequenceInterruptibleBehaviorLeft();
  33.         void       Stop();
  34.         void       Cancel();
  35.         void       RequestActionStart(TFlowNodeId actionNodeId);
  36.         void       ActionComplete();
  37.         void       SetBookmark(TFlowNodeId bookmarkNodeId);
  38.  
  39.         EntityId   GetEntityId() const     { return m_entityId; }
  40.         SequenceId GetSequenceId() const   { return m_sequenceId; }
  41.         bool       IsActive() const        { return m_active; }
  42.         bool       IsInterruptible() const { return m_sequenceProperties.interruptible; }
  43.  
  44. private:
  45.         Sequence() {}
  46.  
  47.         void     AssignSequenceToActionNodes();
  48.         void     AssignSequenceToNode(TFlowNodeId nodeId);
  49.         void     SendEventToNode(SequenceEvent event, TFlowNodeId nodeId);
  50.         EntityId GetEntityIdFromNode(TFlowNodeId nodeId) const;
  51.  
  52.         EntityId           m_entityId;
  53.         SequenceId         m_sequenceId;
  54.         TFlowNodeId        m_startNodeId;
  55.         SequenceProperties m_sequenceProperties;
  56.         IFlowGraph*        m_flowGraph;
  57.  
  58.         bool               m_active;
  59.         bool               m_sequenceBehaviorReady;
  60.  
  61.         TFlowNodeId        m_currentActionNodeId;
  62.         TFlowNodeId        m_bookmarkNodeId;
  63.         typedef std::vector<TFlowNodeId> FlowNodeIdVector;
  64.         FlowNodeIdVector   m_actionNodeIds;
  65. };
  66.  
  67. } // namespace AIActionSequence
  68.  
  69. #endif //Sequence_h
  70.  
downloadSequence.h Source code - Download CRYENGINE Source code
Related Source Codes/Software:
postal - 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top