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
/********************************************************************
*
*	File:		fsCActorComponent.h
*
*	Purpose:	Wrap up in game characters
*
*********************************************************************/

#ifndef fsCActorComponenthdr
#define fsCActorComponenthdr

#include <fsCore/src/fsCUniqueId.h>

#include "../fsIComponent.h"

class fsCSprite;
class fsCResourceName;
class fsIActorMovementComponent;


class fsCActorComponent : public fsIComponent
{
	friend class fsCComponentFactory;

public:

	static const fsStr mEntityPrefix;
	static const fsCUniqueId mTypeId;

	void initialise(const fsCResourceName& pTraitsFile);
	void pathInitialise(const fsCResourceName& pPathFile);

	virtual ~fsCActorComponent();<--- Destructor in derived class

protected:

	void updateDo(fsS32 pDeltaMs) override;<--- Function in derived class
	void initialiseFromVariableTableDo(const fsCVariableTable& pVars) override;

	static fsIComponent* create(fsCEntity* pParent);
	fsCActorComponent(fsCEntity* pParent);

private:

	std::unique_ptr<fsCVariableTable> mTraits;
};

#endif