diff options
author | chai <chaifix@163.com> | 2019-01-11 08:57:26 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-11 08:57:26 +0800 |
commit | b0c09d3534f90fe04ddfa702e6aa54ea6ac0f0a2 (patch) | |
tree | 58420286c90b22beab08bc604e86062809a97ba8 /Source | |
parent | c637fcaecc9dbe86822e38c161b64f46d7d6a8f8 (diff) |
*game object
Diffstat (limited to 'Source')
-rw-r--r-- | Source/Asura/AE_Component.h | 27 | ||||
-rw-r--r-- | Source/Asura/AE_GameObject.h | 37 | ||||
-rw-r--r-- | Source/Asura/AE_Object.h | 2 | ||||
-rw-r--r-- | Source/Asura/AE_Transform.cpp | 0 | ||||
-rw-r--r-- | Source/Asura/AE_Transform.h | 20 | ||||
-rw-r--r-- | Source/Asura/AE_Type.h | 24 | ||||
-rw-r--r-- | Source/Asura/Math/AE_Matrix44.h | 24 | ||||
-rw-r--r-- | Source/Asura/Math/AE_Vector2.h | 17 |
8 files changed, 151 insertions, 0 deletions
diff --git a/Source/Asura/AE_Component.h b/Source/Asura/AE_Component.h index e69de29..91ec46d 100644 --- a/Source/Asura/AE_Component.h +++ b/Source/Asura/AE_Component.h @@ -0,0 +1,27 @@ +#ifndef __AE_COMPONENT_H__ +#define __AE_COMPONENT_H__ + +#include "AE_Object.h" + +namespace AsuraEngine +{ + + class GameObject; + + class Component : public Object + { + public: + virtual void OnEnable(); + virtual void OnEvent(); + virtual void OnUpdate(uint32 milliseconds); + virtual void OnRender(); + virtual void OnDisable(); + + protected: + GameObject* mGameObject; + + }; + +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/AE_GameObject.h b/Source/Asura/AE_GameObject.h index e69de29..bf2e919 100644 --- a/Source/Asura/AE_GameObject.h +++ b/Source/Asura/AE_GameObject.h @@ -0,0 +1,37 @@ +#ifndef __AE_GAMEOBJECT_H__ +#define __AE_GAMEOBJECT_H__ + +#include "./Math/AE_Vector2.h" + +#include "AE_Object.h" +#include "AE_Component.h" +#include "AE_Transform.h" + +namespace AsuraEngine +{ + + /// + /// Ϸʵ + /// + class GameObject : public Object + { + public: + void OnEnable(); + void OnEvent(); + void OnUpdate(uint32 milliseconds); + void OnRender(); + void OnDisable(); + + private: + Transform mTransform; + + }; + + class GameObjectManager + { + + }; + +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/AE_Object.h b/Source/Asura/AE_Object.h index 83449ed..4e4e19e 100644 --- a/Source/Asura/AE_Object.h +++ b/Source/Asura/AE_Object.h @@ -1,6 +1,8 @@ #ifndef __AE_OBJECT_H__ #define __AE_OBJECT_H__ +#include "AE_Type.h" + namespace AsuraEngine { diff --git a/Source/Asura/AE_Transform.cpp b/Source/Asura/AE_Transform.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Source/Asura/AE_Transform.cpp diff --git a/Source/Asura/AE_Transform.h b/Source/Asura/AE_Transform.h new file mode 100644 index 0000000..9666ec4 --- /dev/null +++ b/Source/Asura/AE_Transform.h @@ -0,0 +1,20 @@ +#ifndef __AE_TRANSFORM_H__ +#define __AE_TRANSFORM_H__ + +#include "./Math/AE_Vector2.h" + +namespace AsuraEngine +{ + + class Transform + { + private: + Math::Vector2 position; + Math::Vector2 rotation; + Math::Vector2 scale; + + }; + +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/AE_Type.h b/Source/Asura/AE_Type.h new file mode 100644 index 0000000..2a2bc70 --- /dev/null +++ b/Source/Asura/AE_Type.h @@ -0,0 +1,24 @@ +#ifndef __AE_TYPE_H__ +#define __AE_TYPE_H__ + +#include <stdint.h> + +namespace AsuraEngine +{ + + typedef int8_t int8; + typedef uint8_t uint8; + typedef uint8 byte; + typedef int16_t int16; + typedef uint16_t uint16; + typedef int32_t int32; + typedef uint32_t uint32; + typedef int64_t int64; + typedef uint64_t uint64; + + typedef uint32_t uint; + typedef int32_t sint; + +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Math/AE_Matrix44.h b/Source/Asura/Math/AE_Matrix44.h index e69de29..5bc44e7 100644 --- a/Source/Asura/Math/AE_Matrix44.h +++ b/Source/Asura/Math/AE_Matrix44.h @@ -0,0 +1,24 @@ +#ifndef __AE_MATRIX44_H__ +#define __AE_MATRIX44_H__ + +namespace AsuraEngine +{ + namespace Math + { + + /// + /// 4x4 + /// + class Matrix44 + { + public: + + private: + + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Math/AE_Vector2.h b/Source/Asura/Math/AE_Vector2.h index e69de29..d5f8739 100644 --- a/Source/Asura/Math/AE_Vector2.h +++ b/Source/Asura/Math/AE_Vector2.h @@ -0,0 +1,17 @@ +#ifndef __AE_VECTOR2_H__ +#define __AE_VECTOR2_H__ + +namespace AsuraEngine +{ + namespace Math + { + + class Vector2 + { + + }; + + } +} + +#endif
\ No newline at end of file |