#include <Animated.h>
Public 成员函数 | |
| Animated () | |
| void | Init (std::string name, float delay, int layer) |
Public 成员函数 继承自 Object | |
| Object () | |
| 只是一个场景根组件(带有场景属性),不需要遍历,所以不需要加入容器 | |
| ~Object () | |
| 组件删除的控制权在对象中 | |
| virtual void | Update (float deltaTime) override |
| 遍历运行每个组件 | |
| virtual void | BeginPlay () |
| 设置虚函数,把不能写在构造却需要优先实现的写在这 | |
| virtual void | EndPlay () |
| 设置虚函数,把不能写在析构却需要优先实现的写在这 例如delete this | |
| void | RegisterComponent (Component *pCom) |
| 在物体容器中注册组件. | |
| void | UnregisterComponent (Component *pCom) |
| 从物体组件容器中删除相应组件. | |
| template<class T > | |
| T * | GetComponentByClass () |
| 访问物体对象的跟他匹配的组件. | |
| template<class T > | |
| T * | ConstructComponent () |
| 创建组件,绑定到对象,并注册到对象容器. | |
| void | AttachTo (Object *par) |
| 设置所属物体 实现物体绑定. | |
| void | DetachForm (Object *par) |
| 解除所属物体 解除物体绑定. | |
| void | SetRootComponent (SceneComponent *newroot) |
| 设置场景根组件,物体以哪个组件场景属性作为自己的场景属性. | |
| void | Destroy () |
| 用深度优先遍历进行遍历,借助栈来实现,实现物体及其所有绑定的物体类销毁 | |
| Vector2D | GetLocalPosition () const |
| 获取物体相对坐标 | |
| float | GetLocalRotation () const |
| 获取物体相对角度 | |
| Vector2D | GetLocalScale () const |
| 获取物体相对缩放大小 | |
| Vector2D | GetWorldPosition () const |
| 递归获取物体类的世界坐标 | |
| float | GetWorldRotation () const |
| 递归获取物体类的世界旋转角度 | |
| Vector2D | GetWorldScale () const |
| 递归获取物体类的世界缩放大小 | |
| void | SetLocalPosition (const Vector2D &pos) |
| 设置物体相对坐标 | |
| void | SetLocalRotation (float rot) |
| 设置物体相对角度 | |
| void | SetLocalScale (const Vector2D &scale) |
| 设置物体相对缩放大小 | |
| void | AddPosition (const Vector2D &pos) |
| 加上一个坐标 | |
| void | AddRotation (float rot) |
| 加上一个角度 | |
| virtual void | DrawDebugPosition () const |
| 调试 在画布上显示物体的坐标 | |
Public 成员函数 继承自 base | |
| base () | |
| virtual | ~base () |
| std::string | GetName () const |
| void | SetName (const std::string &name) |
Protected 属性 | |
| class SpriteRenderer * | render |
| Animator * | ani |
| Animation | idle |
Protected 属性 继承自 Object | |
| SceneComponent *const | root = new SceneComponent |
| 场景根组件,赋予场景属性 刚创建物体一定同时创建了它的场景组件,不允许改变指向 | |
| Animated::Animated | ( | ) |
| void Animated::Init | ( | std::string | name, |
| float | delay, | ||
| int | layer ) |
|
protected |
|
protected |
|
protected |