BVB Source Codes

CRYENGINE Show AIFaceManager.h Source code

Return Download CRYENGINE: download AIFaceManager.h Source code - Download CRYENGINE Source code - Type:.h
  1. // Copyright 2001-2016 Crytek GmbH / Crytek Group. All rights reserved.
  2.  
  3. /********************************************************************
  4.    CryGame Source File.
  5.    -------------------------------------------------------------------------
  6.    File name:   AIFaceManager.h
  7.    Version:     v1.00
  8.    Description: take care of playing proper face expresion sequence
  9.  
  10.    -------------------------------------------------------------------------
  11.    History:
  12.    - 05:05:2007   12:04 : Created by Kirill Bulatsev
  13.  
  14.  *********************************************************************/
  15.  
  16. #ifndef __AIFaceManager_H__
  17. #define __AIFaceManager_H__
  18.  
  19. #pragma once
  20.  
  21. //
  22. //---------------------------------------------------------------------------------------------------
  23.  
  24. class CAIFaceManager
  25. {
  26. public:
  27.         enum e_ExpressionEvent
  28.         {
  29.                 EE_NONE,
  30.                 EE_IDLE,
  31.                 EE_ALERT,
  32.                 EE_COMBAT,
  33.                 EE_Count
  34.         };
  35.  
  36.         CAIFaceManager(IEntity* pEntity);
  37.         ~CAIFaceManager(void);
  38.  
  39.         static bool              LoadStatic();
  40.         static bool              Load(const char* szFileName);
  41.         static e_ExpressionEvent StringToEnum(const char* str);
  42.  
  43.         void                     SetExpression(e_ExpressionEvent expression, bool forceChange = false);
  44.         void                     Update();
  45.         void                     Reset();
  46.         void                     PrecacheSequences();
  47.  
  48.         void                     OnReused(IEntity* pEntity);
  49.  
  50. protected:
  51.  
  52.         typedef std::vector<string> TExprState;
  53.         static TExprState s_Expressions[EE_Count + 1];
  54.  
  55.         void MakeFace(const char* pFaceName);
  56.         int  SelectExpressionTime() const;
  57.  
  58.         e_ExpressionEvent m_CurrentState;
  59.         int               m_CurrentExprIdx;
  60.         CTimeValue        m_ExprStartTime;
  61.         int               m_ChangeExpressionTimeMs;
  62.  
  63.         IEntity*          m_pEntity;
  64. };
  65.  
  66. #endif // __AIFaceManager_H__
  67.  
downloadAIFaceManager.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