home *** CD-ROM | disk | FTP | other *** search
/ AI Game Programming Wisdom / AIGameProgrammingWisdom.iso / SourceCode / 06 General Architectures / 04 Christian / chased.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-16  |  471 b   |  35 lines

  1.  
  2. #include "character.h"
  3. #include "Chased.h"
  4. #include "gametime.h"
  5. #include "util.h"
  6.  
  7. Chased::Chased()
  8. {
  9.     m_name      = "Chased";
  10.     m_owner     = NULL;
  11. }
  12.  
  13. void Chased::init   ( IEOwner * owner )
  14. {
  15.     m_owner = dynamic_cast<Character *> (owner);
  16. }
  17.  
  18.  
  19. bool Chased::update () 
  20. {
  21.     return m_owner->beingChased();
  22. }
  23.  
  24.  
  25. IEOwner * Chased::getOwner ()
  26. {
  27.     return m_owner;
  28. }
  29.  
  30. const char * Chased::getName()
  31. {
  32.     return m_name.c_str();
  33. }
  34.  
  35.