/TGame/TCommon/Gene/Status/GERPGStatus.h

http://awoe.googlecode.com/ · C Header · 52 lines · 26 code · 10 blank · 16 comment · 0 complexity · a84a46ff9d9ce3ac7008f41a8b36876f MD5 · raw file

  1. #pragma once
  2. ///////////////////////////////////////////////////////////////////////////////////////////////////
  3. // GERPGStatus.h
  4. // Tuesday, July 20, 2010
  5. // Copyright ?2009, 2010, 8DWorld, Inc. All rights reserved.
  6. //
  7. // $Description$
  8. ///////////////////////////////////////////////////////////////////////////////////////////////////
  9. #include "gene\unitgene.h"
  10. #include "Util/Movable2DPicture.h"
  11. class GERPGStatus :
  12. public UnitGene
  13. {
  14. public:
  15. GERPGStatus(void);
  16. GERPGStatus(int nStatusID);
  17. virtual ~UGRPGStatus(void);
  18. //
  19. // Fire when the gene is attached on a unit. just like unit enter the state.
  20. //
  21. virtual bool OnAttach();
  22. //
  23. // Fire when the gene is detached from a unit. just like unit leave the state.
  24. //
  25. virtual bool OnDetach();
  26. //
  27. // Periodically update gene logic, normally a gene will be detach when run out of its time to live.
  28. //
  29. virtual bool OnUpdate(int nElapse);
  30. void SetStatusId(int nId);
  31. protected:
  32. bool OnUpdatePosition();
  33. private:
  34. int m_nStatusId;
  35. Movable2DPicture* m_pMovablePic;
  36. Ogre::SceneNode* m_pSceneNode; //Which is used to control the 2D picture
  37. Vector3 m_ptStart;
  38. Vector3 m_ptVector; //The target poistion
  39. int m_nExistTime;
  40. Vector4 m_area1;
  41. Vector4 m_area2;
  42. };