Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "Entities/Helpers/NativeEntityBase.h"
- class CGameEntityNodeFactory;
- ////////////////////////////////////////////////////////
- // Sample entity for creating a light source
- ////////////////////////////////////////////////////////
- class CAreaTriggerEntity
- : public CGameObjectExtensionHelper<CAreaTriggerEntity, CNativeEntityBase>
- {
- enum EInputPorts
- {
- eInputPort_TurnOn = 0,
- eInputPort_TurnOff
- };
- enum EOutputPorts
- {
- eOutputPort_AreaEnter = 0,
- eOutputPort_AreaLeave,
- eOutputPort_AreaEnterEntityId,
- eOutputPort_AreaLeaveEntityId
- };
- // Indices of the properties, registered in the Register function
- enum EProperties
- {
- eProperty_Active = 0,
- eProperty_Radius,
- eNumProperties
- };
- public:
- CAreaTriggerEntity();
- virtual ~CAreaTriggerEntity() {}
- // CNativeEntityBase
- virtual void ProcessEvent(SEntityEvent& event) override;
- // ~CNativeEntityBase
- public:
- // Called to register the entity class and its properties
- static void Register();
- // Called when one of the input Flowgraph ports are activated in one of the entity instances tied to this class
- static void OnFlowgraphActivation(EntityId entityId, IFlowNode::SActivationInfo* pActInfo, const class CFlowGameEntityNode *pNode);
- protected:
- // Called on entity spawn, or when the state of the entity changes in Editor
- void Reset();
- };
Add Comment
Please, Sign In to add comment