1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/********************************************************************
*
*	File:		gfCTaskComponent.h
*
*	Purpose:	An entity which is automatically collected when a
*				matching lock is collected.
*
*********************************************************************/

#ifndef gfCTaskComponenthdr
#define gfCTaskComponenthdr

#include <fsCore/src/fsCUniqueId.h>

#include "gfICollectableComponent.h"

class fsCRollOverGui;

class gfCTaskComponent : public gfICollectableComponent
{
	friend class fsCComponentFactory;

public:

	static const fsCUniqueId mTypeId;
	static const fsStr mEntityPrefix;
	static const fsCUniqueId mTaskCompleteMsg;

	fsS32 scoreGet() const;

	const fsStr taskTipGet() const;
	void rollOverCandidateRegister(fsCRollOverGui* pRollOver, fsCEntity* pSlot);
	void rollOverCandidateDeRegister();

protected:

	void onCollectionEffectCompleteDo() override;
	void listenersRegisterDo() override;
	void listenersDeregisterDo() override;
	fsBool messageProcessDo(const fsCUniqueId& pMessageType,
	                        const fsIMessageDispatcher::sMessageParameters& pParam) override;

	static fsIComponent* create(fsCEntity* pParent);

	gfCTaskComponent(fsCEntity* pParent);
	virtual ~gfCTaskComponent();<--- Destructor in derived class

private:
	
	fsCEntity* mGuiSlot;
	fsCRollOverGui* mRollOverGui;
};

#endif