BVB Source Codes

CRYENGINE Show PersonalSignalTimer.h Source code

Return Download CRYENGINE: download PersonalSignalTimer.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /********************************************************************
  4.    ---------------------------------------------------------------------
  5.    File name:   PersonalSignalTimer.h
  6.    $Id$
  7.    $DateTime$
  8.    Description: Manager per-actor signal timers
  9.    ---------------------------------------------------------------------
  10.    History:
  11.    - 07:05:2007 : Created by Ricardo Pillosu
  12.  
  13.  *********************************************************************/
  14. #ifndef _PERSONAL_SIGNAL_TIMER_H_
  15. #define _PERSONAL_SIGNAL_TIMER_H_
  16.  
  17. #include "AIProxy.h"
  18.  
  19. class CSignalTimer;
  20.  
  21. class CPersonalSignalTimer : public IAIProxyListener
  22. {
  23.  
  24. public:
  25.         // Base ----------------------------------------------------------
  26.         CPersonalSignalTimer(CSignalTimer* pParent);
  27.         virtual ~CPersonalSignalTimer();
  28.         bool Init(EntityId Id, const char* sSignal);
  29.         bool Update(float fElapsedTime, uint32 uDebugOrder = 0);
  30.         void ForceReset(bool bAlsoEnable = true);
  31.         void OnProxyReset();
  32.  
  33.         // Utils ---------------------------------------------------------
  34.         void          SetEnabled(bool bEnabled);
  35.         void          SetRate(float fNewRateMin, float fNewRateMax);
  36.         EntityId      GetEntityId() const;
  37.         const string& GetSignalString() const;
  38.  
  39. private:
  40.         void           Reset(bool bAlsoEnable = true);
  41.         void           SendSignal();
  42.         IEntity*       GetEntity();
  43.         IEntity const* GetEntity() const;
  44.         void           DebugDraw(uint32 uOrder) const;
  45.  
  46.         // IAIProxyListener
  47.         void         SetListener(bool bAdd);
  48.         virtual void OnAIProxyEnabled(bool bEnabled);
  49.         // ~IAIProxyListener
  50.  
  51. private:
  52.  
  53.         bool          m_bInit;
  54.         CSignalTimer* m_pParent;
  55.         EntityId      m_EntityId;
  56.         string        m_sSignal;
  57.         float         m_fRateMin;
  58.         float         m_fRateMax;
  59.         float         m_fTimer;
  60.         float         m_fTimerSinceLastReset;
  61.         int           m_iSignalsSinceLastReset;
  62.         bool          m_bEnabled;
  63.         IFFont*       m_pDefaultFont;
  64. };
  65. #endif // _PERSONAL_SIGNAL_TIMER_H_
  66.  
downloadPersonalSignalTimer.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