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
55
56
57
58
59
/********************************************************************
*
*	File:		gfCFlipsawMiniGameLogicComponent.h
*
*	Purpose:	Logic component added to a scene to control the
*				flipsaw as a mini game - need to
*				track them and reset if required
*
*********************************************************************/

#ifndef gfCFlipsawMiniGameLogicComponenthdr
#define gfCFlipsawMiniGameLogicComponenthdr

#include "gfCFlipsawMinigameComponent.h"
#include "../gfIMinigameLogic.h"

class gfCFlipsawMinigameComponent;

class gfCFlipsawMiniGameLogicComponent : public gfIMinigameLogic
{
	friend class fsCComponentFactory;
	friend class gfCHogEntityFactory;

public:

	static const fsCUniqueId mTypeId;
	static const fsStr mEntityPrefix;

	std::vector<gfCFlipsawMinigameComponent*> gamePiecesGet() const;<--- Function 'gamePiecesGet()' should return member 'mGamePieces' by const reference.

protected:

	void skipDo() override;<--- Function in derived class

	void listenersRegisterDo() override;
	void listenersDeregisterDo() override;
	fsBool messageProcessDo(const fsCUniqueId& pMessageType,<--- Function in derived class
	                        const fsIMessageDispatcher::sMessageParameters& pParam) override;

	void resetDo() override;
	void deserialiseDo() override;
	void serialiseDo() override;

	void initialiseFromVariableTableDo(const fsCVariableTable& pVars) override;

	static fsIComponent* create(fsCEntity* pParent);

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

private:
	
	void gamePiecesCollect();

	std::vector<gfCFlipsawMinigameComponent*> mGamePieces;

};

#endif