PageRenderTime 18ms CodeModel.GetById 11ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/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
12class GERPGStatus :
13    public UnitGene
14{
15public:
16    GERPGStatus(void);
17	GERPGStatus(int nStatusID);
18    virtual ~UGRPGStatus(void);
19
20    // 
21	//	Fire when the gene is attached on a unit. just like unit enter the state.
22	//
23	virtual bool OnAttach();
24
25	// 
26	//	Fire when the gene is detached from a unit. just like unit leave the state.
27	//
28	virtual bool OnDetach();
29
30    // 
31	//	Periodically update gene logic, normally a gene will be detach when run out of its time to live.
32	//
33	virtual bool OnUpdate(int nElapse);
34
35    void SetStatusId(int nId);
36protected:
37     
38    bool OnUpdatePosition();
39
40private:
41    int m_nStatusId;
42    Movable2DPicture* m_pMovablePic;
43    Ogre::SceneNode* m_pSceneNode; //Which is used to control the 2D picture
44    Vector3 m_ptStart;
45    Vector3 m_ptVector; //The target poistion 
46    int m_nExistTime;
47    Vector4 m_area1;
48    Vector4 m_area2;
49
50
51};
52