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
/********************************************************************
*
*	File:		fsC3dPathSprite.h
*
*	Purpose:	Sprite that when attached to parent sprite makes
*				the parent follow it
*
*********************************************************************/

#ifndef fsC3dPathSpritehdr
#define fsC3dPathSpritehdr

#include <fsCore/fsStr.h>

#include "fsC3dSprite.h"

class fsI3dModelData;


class fsC3dPathSprite : public fsC3dSprite
{
	friend class fsI3dSprite;
	friend class fsCNative3dSprite;
	friend class fsCNative3dScene;

public:

	void init(fsC3dSprite* pParent);
	void follow(fsS32 pDeltaMS);

	static std::shared_ptr<fsC3dPathSprite> create(std::shared_ptr<fsI3dModelData> pModelData);

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

protected:

	void activeAnimationSetDo(const fsStr& pAnimationName, std::function<void()> pCallBack = nullptr) override;

	fsC3dPathSprite(std::shared_ptr<fsI3dModelData> pModelData);

private:

	fsC3dSprite* mTrackParent;
};

#endif