home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 March / Gamestar_82_2006-03_dvd.iso / DVDStar / Editace / quake4_sdkv10.exe / source / game / TramGate.h < prev    next >
C/C++ Source or Header  |  2005-11-14  |  1KB  |  52 lines

  1. #ifndef __RV_TRAM_GATE_H
  2. #define __RV_TRAM_GATE_H
  3.  
  4. extern const idEventDef EV_OpenGate;
  5. extern const idEventDef EV_CloseGate;
  6.  
  7. class rvTramGate : public idAnimatedEntity {
  8.     CLASS_PROTOTYPE( rvTramGate );
  9.  
  10. public:
  11.     void                Spawn();
  12.     virtual                ~rvTramGate();
  13.  
  14.     void                OpenGate();
  15.     void                CloseGate();
  16.  
  17.     void                Save( idSaveGame *savefile ) const;
  18.     void                Restore( idRestoreGame *savefile );
  19.  
  20. protected:
  21.     void                SpawnDoors();
  22.     void                AdjustFrameRate();
  23.  
  24.     int                    PlayAnim( int channel, const char* animName, int blendFrames = 0 );
  25.     void                CycleAnim( int channel, const char* animName, int blendFrames = 0 );
  26.     void                ClearAllAnims( int blendFrames = 0 );
  27.     void                ClearAnim( int channel, int blendFrames = 0 );
  28.     bool                AnimIsPlaying( int channel, int blendFrames = 0 );
  29.  
  30.     bool                IsOpen() const;
  31.     bool                IsClosed() const;
  32.  
  33.     idDoor*                GetDoorMaster() const;
  34.     bool                IsDoorMasterValid() const;
  35.     
  36. protected:
  37.     void                Event_Touch( idEntity* other, trace_t* trace );
  38.     void                Event_Activate( idEntity* activator );
  39.  
  40.     void                Event_OpenGate();
  41.     void                Event_CloseGate();
  42.  
  43.     void                Event_IsOpen( void );
  44.     void                Event_IsLocked( void );
  45.     void                Event_Lock( int f );
  46.  
  47. protected:
  48.     idList< idEntityPtr<idDoor> > doorList;
  49. };
  50.  
  51. #endif
  52.