Guest User

Untitled

a guest
Sep 7th, 2016
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.37 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "Entities/Helpers/NativeEntityBase.h"
  4.  
  5. class CGameEntityNodeFactory;
  6.  
  7. ////////////////////////////////////////////////////////
  8. // Sample entity for creating a light source
  9. ////////////////////////////////////////////////////////
  10. class CAreaTriggerEntity
  11.     : public CGameObjectExtensionHelper<CAreaTriggerEntity, CNativeEntityBase>
  12. {
  13.     enum EInputPorts
  14.     {
  15.         eInputPort_TurnOn = 0,
  16.         eInputPort_TurnOff
  17.     };
  18.  
  19.     enum EOutputPorts
  20.     {
  21.         eOutputPort_AreaEnter = 0,
  22.         eOutputPort_AreaLeave,
  23.         eOutputPort_AreaEnterEntityId,
  24.         eOutputPort_AreaLeaveEntityId
  25.     };
  26.  
  27.  
  28.     // Indices of the properties, registered in the Register function
  29.     enum EProperties
  30.     {
  31.         eProperty_Active = 0,
  32.         eProperty_Radius,
  33.         eNumProperties
  34.     };
  35.  
  36. public:
  37.     CAreaTriggerEntity();
  38.     virtual ~CAreaTriggerEntity() {}
  39.  
  40.     // CNativeEntityBase
  41.     virtual void ProcessEvent(SEntityEvent& event) override;
  42.     // ~CNativeEntityBase
  43.  
  44. public:
  45.     // Called to register the entity class and its properties
  46.     static void Register();
  47.  
  48.     // Called when one of the input Flowgraph ports are activated in one of the entity instances tied to this class
  49.     static void OnFlowgraphActivation(EntityId entityId, IFlowNode::SActivationInfo* pActInfo, const class CFlowGameEntityNode *pNode);
  50.  
  51. protected:
  52.     // Called on entity spawn, or when the state of the entity changes in Editor
  53.     void Reset();
  54. };
Add Comment
Please, Sign In to add comment