BVB Source Codes

CRYENGINE Show FlowMissionNodes.cpp Source code

Return Download CRYENGINE: download FlowMissionNodes.cpp Source code - Download CRYENGINE Source code - Type:.cpp
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. #include "StdAfx.h"
  4. #include "CryAction.h"
  5. #include "IGameRulesSystem.h"
  6.  
  7. #include <CryFlowGraph/IFlowBaseNode.h>
  8.  
  9. class CFlowNode_EndLevel : public CFlowBaseNode<eNCT_Singleton>
  10. {
  11. public:
  12.         CFlowNode_EndLevel(SActivationInfo* pActInfo)
  13.         {
  14.         }
  15.  
  16.         void GetConfiguration(SFlowNodeConfig& config)
  17.         {
  18.                 static const SInputPortConfig in_ports[] =
  19.                 {
  20.                         InputPortConfig_Void("Trigger",      _HELP("Finish the current mission (go to next level)")),
  21.                         InputPortConfig<string>("NextLevel", _HELP("Which level is the next level?")),
  22.                         { 0 }
  23.                 };
  24.                 config.sDescription = _HELP("Advance to a new level");
  25.                 config.pInputPorts = in_ports;
  26.                 config.pOutputPorts = 0;
  27.                 config.SetCategory(EFLN_APPROVED);
  28.         }
  29.  
  30.         void ProcessEvent(EFlowEvent event, SActivationInfo* pActInfo)
  31.         {
  32.                 CCryAction* pCryAction = CCryAction::GetCryAction();
  33.                 if (!pCryAction->IsInTimeDemo() && event == eFE_Activate && IsPortActive(pActInfo, 0))
  34.                 {
  35.                         pCryAction->ScheduleEndLevel(GetPortString(pActInfo, 1));
  36.                 }
  37.         }
  38.  
  39.         virtual void GetMemoryUsage(ICrySizer* s) const
  40.         {
  41.                 s->Add(*this);
  42.         }
  43. };
  44.  
  45. REGISTER_FLOW_NODE("Mission:LoadNextLevel", CFlowNode_EndLevel);
  46.  
downloadFlowMissionNodes.cpp 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