home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 06 General Architectures / 06 Rabin / gameobject.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-12-10  |  873 b   |  38 lines

  1. /* Copyright (C) Steve Rabin, 2001. 
  2.  * All rights reserved worldwide.
  3.  *
  4.  * This software is provided "as is" without express or implied
  5.  * warranties. You may freely copy and compile this source into
  6.  * applications you distribute provided that the copyright text
  7.  * below is included in the resulting source code, for example:
  8.  * "Portions Copyright (C) Steve Rabin, 2001"
  9.  */
  10.  
  11. #ifndef __GAMEOBJECT_H__
  12. #define __GAMEOBJECT_H__
  13.  
  14. #include "global.h"
  15.  
  16. class StateMachine;
  17.  
  18. class GameObject
  19. {
  20. public:
  21.  
  22.     GameObject( objectID id );
  23.     ~GameObject( void );
  24.  
  25.     objectID GetID( void )                            { return( m_ID ); }
  26.     StateMachine* GetStateMachine( void )            { return( m_StateMachine ); }
  27.     void SetStateMachine( StateMachine * mch )        { m_StateMachine = mch; }
  28.  
  29. private:
  30.  
  31.     objectID m_ID;
  32.  
  33.     StateMachine* m_StateMachine;
  34.  
  35. };
  36.  
  37.  
  38. #endif    // __GAMEOBJECT_H__