-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnimatedSprite3D.h
36 lines (26 loc) · 941 Bytes
/
AnimatedSprite3D.h
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
#pragma once
#include "AnimNavMeshAgent.h"
#include "AnimationManager.h"
#include "cocos2d.h"
NS_CC_BEGIN
/** This sprite is the base class for all different types of characters. The
* primary functionality of this class is to support animations and different
* texture maps for the main character and their weapons.
*
* The final children classes would handle character level ups and other RPG
* interactions like collision and who hit who should belong to some other
* class.
*/
class AnimatedSprite3D : public Sprite3D,
public AnimationMSM,
public AnimationManager {
AnimNavMeshAgent *_agent = nullptr;
public:
AnimatedSprite3D();
static AnimatedSprite3D *create(const std::string &);
virtual bool addComponent(Component *) override;
void move(const Vec3 &);
void moveCallback(NavMeshAgent *, float);
friend class AnimationMSM;
};
NS_CC_END