diff options
Diffstat (limited to 'Source')
34 files changed, 581 insertions, 132 deletions
diff --git a/Source/Asura/AI/StateMachine.h b/Source/Asura/AI/StateMachine.h index e69de29..17f8945 100644 --- a/Source/Asura/AI/StateMachine.h +++ b/Source/Asura/AI/StateMachine.h @@ -0,0 +1,33 @@ +#ifndef __AE_STATEMACHINE_H__ +#define __AE_STATEMACHINE_H__ + +#include "StateMap.h" +#include "Component.h" + +namespace AsuraEngine +{ + namespace AI + { + + /// + /// Ϊstate mapĴ + /// + class StateMachine : public Component + { + public: + + + + private: + + /// + /// Statemachine ʹõstateͼ + /// + StateMap* mStateMap; + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Graphics/Graphic.cpp b/Source/Asura/AI/StateMap.cpp index e69de29..e69de29 100644 --- a/Source/Asura/Graphics/Graphic.cpp +++ b/Source/Asura/AI/StateMap.cpp diff --git a/Source/Asura/AI/StateMap.h b/Source/Asura/AI/StateMap.h new file mode 100644 index 0000000..873e1d9 --- /dev/null +++ b/Source/Asura/AI/StateMap.h @@ -0,0 +1,25 @@ +#ifndef __AE_STATEMAP_H__ +#define __AE_STATEMAP_H__ + +#include "Filesystem/Asset.h" + +namespace AsuraEngine +{ + namespace AI + { + + class StateMap : public Filesystem::Asset + { + public: + + + private: + + + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Component.h b/Source/Asura/Component.h index 5a9073d..807bbba 100644 --- a/Source/Asura/Component.h +++ b/Source/Asura/Component.h @@ -8,6 +8,9 @@ namespace AsuraEngine class GameObject; + /// + /// ComponentͨprefabGameObjectϡ + /// class Component : public Object { public: diff --git a/Source/Asura/Factory.h b/Source/Asura/Factory.h new file mode 100644 index 0000000..0cccab2 --- /dev/null +++ b/Source/Asura/Factory.h @@ -0,0 +1,14 @@ +#ifndef __AE_FACTORY_H__ +#define __AE_FACTORY_H__ + +namespace AsuraEngine +{ + + class Factory + { + + }; + +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/FileSystem/AnimationImpoter.h b/Source/Asura/FileSystem/AnimationImpoter.h new file mode 100644 index 0000000..57fdfdb --- /dev/null +++ b/Source/Asura/FileSystem/AnimationImpoter.h @@ -0,0 +1,20 @@ +#ifndef __AE_IMAGE_IMPORTER_H__ +#define __AE_IMAGE_IMPORTER_H___ + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// .asranimation + /// + class AnimationImporter + { + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/FileSystem/Asset.h b/Source/Asura/FileSystem/Asset.h index e69de29..9fc6607 100644 --- a/Source/Asura/FileSystem/Asset.h +++ b/Source/Asura/FileSystem/Asset.h @@ -0,0 +1,22 @@ +#ifndef __AE_ASSET_H__ +#define __AE_ASSET_H__ + +#include "Object.h" + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// AssetΪ + /// + class Asset : public Object + { + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/FileSystem/ImageImpoter.h b/Source/Asura/FileSystem/ImageImpoter.h new file mode 100644 index 0000000..ca7cb9a --- /dev/null +++ b/Source/Asura/FileSystem/ImageImpoter.h @@ -0,0 +1,20 @@ +#ifndef __AE_IMAGE_IMPORTER_H__ +#define __AE_IMAGE_IMPORTER_H___ + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// .asrimage + /// + class ImageImporter + { + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/FileSystem/Importer.h b/Source/Asura/FileSystem/Importer.h new file mode 100644 index 0000000..b343a92 --- /dev/null +++ b/Source/Asura/FileSystem/Importer.h @@ -0,0 +1,17 @@ +#ifndef __AE_IMPORTER_H__ +#define __AE_IMPORTER_H__ + +namespace AsuraEngine +{ + namespace Filesystem + { + + class Importer + { + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/FileSystem/ParticleSystemImpoter.h b/Source/Asura/FileSystem/ParticleSystemImpoter.h new file mode 100644 index 0000000..92796f3 --- /dev/null +++ b/Source/Asura/FileSystem/ParticleSystemImpoter.h @@ -0,0 +1,20 @@ +#ifndef __AE_IMAGE_IMPORTER_H__ +#define __AE_IMAGE_IMPORTER_H___ + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// .asrparticle system + /// + class ParticleSystemImporter + { + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/FileSystem/SpriteImpoter.h b/Source/Asura/FileSystem/SpriteImpoter.h new file mode 100644 index 0000000..0e157c1 --- /dev/null +++ b/Source/Asura/FileSystem/SpriteImpoter.h @@ -0,0 +1,20 @@ +#ifndef __AE_IMAGE_IMPORTER_H__ +#define __AE_IMAGE_IMPORTER_H___ + +namespace AsuraEngine +{ + namespace Filesystem + { + + /// + /// .asrsprite + /// + class SpriteImporter + { + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/GameObject.h b/Source/Asura/GameObject.h index 8e79b65..85dc87f 100644 --- a/Source/Asura/GameObject.h +++ b/Source/Asura/GameObject.h @@ -7,6 +7,7 @@ #include "Object.h" #include "Component.h" #include "Transform.h" +#include "Manager.hpp" namespace AsuraEngine { @@ -37,7 +38,7 @@ namespace AsuraEngine void SetScale(const Math::Vector2& scale); void SetRotation(const Math::Vector2& rotation); - template<typename T> + template<typename T> inline T GetComponent() { return NULL; diff --git a/Source/Asura/Graphics/Animation.h b/Source/Asura/Graphics/Animation.h index 0e4bd5a..391da22 100644 --- a/Source/Asura/Graphics/Animation.h +++ b/Source/Asura/Graphics/Animation.h @@ -8,6 +8,7 @@ #include "Containers/Map.h" #include "Containers/Vector.hpp" #include "Containers/StringMap.hpp" +#include "Filesystem/Asset.h" namespace AsuraEngine { @@ -17,16 +18,17 @@ namespace AsuraEngine /// /// ؼ֡ /// - struct AnimationKeyFrame + struct Frame { + uint mask; // float time; Sprite* sprite; }; /// - /// SpriteԸıspriteĴСתšimage + /// SpriteԸıspriteĴСתšimageAnimationͨanimatorġ /// - class Animation final : public Component + class Animation final : public Filesystem::Asset { public: @@ -43,35 +45,50 @@ namespace AsuraEngine }; - void OnEnable() override; - void OnUpdate(uint32 milliseconds) override; - - void SetSpeed(float speed); + /// + /// ʱһ֡ + /// + Frame GetFrame(float t); - private: + /// + /// ùؼ֡ + /// + uint GetKeyFrameCount(); - Containers::Vector<AnimationKeyFrame> mFrames; + /// + /// Ƿѭ + /// + uint GetLoop(); - float mTime; + /// + /// ȡʱ + /// + uint GetDuration(); - bool mLoop; + private: /// - /// ٶȣĬΪ1 + /// ؼ֡ /// - float mSpeed; + Containers::Vector<Frame> mFrames; /// + /// ʱ + /// + float mDuration; + /// + /// Ƿѭ /// - uint mKey; + bool mLoop; - Containers::String mName; + /// + /// ID + /// + uint mID; UpdateMask mUpdateMask; - SpriteRenderer* mSpriteRenderer; - }; class AnimationManager : public Manager diff --git a/Source/Asura/Graphics/RenderTarget.cpp b/Source/Asura/Graphics/Animator.cpp index e69de29..e69de29 100644 --- a/Source/Asura/Graphics/RenderTarget.cpp +++ b/Source/Asura/Graphics/Animator.cpp diff --git a/Source/Asura/Graphics/Animator.h b/Source/Asura/Graphics/Animator.h new file mode 100644 index 0000000..e8101cc --- /dev/null +++ b/Source/Asura/Graphics/Animator.h @@ -0,0 +1,91 @@ +#ifndef __AE_ANIMATOR_H__ +#define __AE_ANIMATOR_H__ + +#include "Component.h" +#include "Animation.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + /// + /// animationҪΪanimationĴ + /// + class Animator final : public Component + { + public: + + void OnEnable() override; + void OnUpdate(uint32 milliseconds) override; + + /// + /// animation + /// + void SetAnimation(uint ID); + + /// + /// animation + /// + void SetAnimation(Animation* animation); + + /// + /// animation״̬ + /// + void SetTime(float time); + + /// + /// IJٶ + /// + void SetSpeed(float speed); + + /// + /// Ƿѭ + /// + void SetLoop(bool isloop); + + /// + /// ݹؼ֡animation + /// + void SetKeyFrame(uint keyFrame); + + /// + /// õ + /// + void SetToBegin(); + + /// + /// õʼ + /// + void SetToEnd(); + + private: + + /// + /// ǰanimation + /// + Animation* mAnimation; + + /// + /// AnimationҪһsprite renderer + /// + SpriteRenderer* mSpriteRenderer; + + /// + /// ٶȣĬΪ1dt = mSpeed * DELTA_TIME + /// + float mSpeed; + + /// + /// ǰִеʱ + /// + float mTime; + + bool mLoop; + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Graphics/Canvas.h b/Source/Asura/Graphics/Canvas.h index 0af933f..cd78194 100644 --- a/Source/Asura/Graphics/Canvas.h +++ b/Source/Asura/Graphics/Canvas.h @@ -1,12 +1,15 @@ #ifndef __AE_Canvas_H__ #define __AE_Canvas_H__ +#include "Component.h" +#include "Texture.h" + namespace AsuraEngine { namespace Graphics { - class Canvas + class Canvas : public Texture, public Component { }; diff --git a/Source/Asura/Prefab.cpp b/Source/Asura/Graphics/CanvasRenderer.cpp index e69de29..e69de29 100644 --- a/Source/Asura/Prefab.cpp +++ b/Source/Asura/Graphics/CanvasRenderer.cpp diff --git a/Source/Asura/Graphics/CanvasRenderer.h b/Source/Asura/Graphics/CanvasRenderer.h new file mode 100644 index 0000000..ef188a5 --- /dev/null +++ b/Source/Asura/Graphics/CanvasRenderer.h @@ -0,0 +1,30 @@ +#ifndef __AE_CANVAS_RENDERER_H__ +#define __AE_CANVAS_RENDERER_H__ + +#include "Canvas.h" +#include "Renderer.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + class CanvasRenderer : public Renderer + { + public: + + void SetCanvas(Canvas* canvas); + Canvas* GetCanvas(); + + void SetBlendMode(); + + private: + + Canvas * mCanvas; + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Graphics/Color.h b/Source/Asura/Graphics/Color.h index 713e884..1e3b131 100644 --- a/Source/Asura/Graphics/Color.h +++ b/Source/Asura/Graphics/Color.h @@ -6,11 +6,22 @@ namespace AsuraEngine namespace Graphics { + /// + /// + /// class Color { }; + /// + /// + /// + class Color32 + { + + }; + } } diff --git a/Source/Asura/Graphics/Graphic.h b/Source/Asura/Graphics/Graphic.h deleted file mode 100644 index 2a6fe8f..0000000 --- a/Source/Asura/Graphics/Graphic.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __AE_GRAPHIC_H__ -#define __AE_GRAPHIC_H__ - -namespace AsuraEngine -{ - - class Graphic - { - public: - - private: - - - }; - -} - -#endif
\ No newline at end of file diff --git a/Source/Asura/Graphics/Image.h b/Source/Asura/Graphics/Image.h index 34a83ce..96fa63c 100644 --- a/Source/Asura/Graphics/Image.h +++ b/Source/Asura/Graphics/Image.h @@ -3,18 +3,22 @@ #include "Math/Vector2.h" #include "Manager.hpp" -#include "Object.h" +#include "Texture.h" +#include "Color.h" +#include "Factory.h" namespace AsuraEngine { namespace Graphics { + class ImageFactory; + /// /// ImageͼƬڴȡϷĽһImageڴ桢ԴֻᱣһݣҪ /// imageêλãźתǶȣʹspriteһֻࡣ /// - class Image final : public Object + class Image final : public Texture, public Filesystem::Asset { public: @@ -22,12 +26,28 @@ namespace AsuraEngine uint GetWidth(); uint GetHeight(); + /// + /// ijһλõ + /// + Color GetPixel(uint x, uint y); + private: + friend class ImageFactory; + + Image(Color* pixels, int width, int height); + ~Image(); + /// /// СΪλ /// uint mWidth, mHeight; + Color* mPixels; + + /// + /// ID + /// + uint mID; }; @@ -35,16 +55,28 @@ namespace AsuraEngine { public: - uint GetImagePath(uint ID); + /// + /// ͨIDȡ·dzͼƬString::Null + /// + Containers::String GetImagePath(uint ID); + /// + /// ͨID·ȡIDûҵ0 + /// uint GetImageID(const Containers::String& path); Image* GetImage(const Containers::String& path); - Image* GetImage(const Containers::String& id); + Image* GetImage(const Containers::String& ID); uint AddImage(const Containers::String& path, Image* image); + uint AddImage(Image* image); + + bool RemoveImage(uint ID); + + bool RemoveImage(Image* image); + private: /// @@ -53,12 +85,29 @@ namespace AsuraEngine Containers::Map<uint, Image*> mImages; /// - /// еimage·IDӳ + /// image·IDӳ䡣Դ.asrimageͨ·õimageԲеimageڴmapС + /// ɳimageֻͨIDȡԳҪID /// Containers::StringMap<uint> mImageIDs; }; + class ImageFactory : public Factory + { + public: + + /// + /// image pixelйimage + /// + Image* ReadBuffer(Color* pixels, int width, int height); + + /// + /// image externݲ + /// + Image* Decode(); + + }; + } } diff --git a/Source/Asura/Graphics/Material.h b/Source/Asura/Graphics/Material.h index 56db3d9..1cb3c88 100644 --- a/Source/Asura/Graphics/Material.h +++ b/Source/Asura/Graphics/Material.h @@ -18,12 +18,14 @@ namespace AsuraEngine namespace Graphics { + class MaterialFactory; + /// /// ͨʵShaderеuniformsShaderĵı¶materialÿʿԲ컯ͬɫ /// ͬͨļ(.mat)ʵ֣ڴáAsuraУShaderֱӦõȾ̶һ /// ʹɲshaderuniformsmaterial䵱shaderĴ /// - class Material final : public Object + class Material final : public Filesystem::Asset { public: @@ -42,7 +44,7 @@ namespace AsuraEngine struct UniformsInfo { - int id; // uniformID + uint ID; // uniformID UniformsType type; // uniform union { @@ -57,12 +59,6 @@ namespace AsuraEngine }value; // uniformֵ }; - Material(); - Material(const Material& srcMat); - ~Material(); - - Material* Clone(); - void SetShader(Shader* shader); // UniformڲУȾʱϴGPU @@ -73,24 +69,24 @@ namespace AsuraEngine /// static int GetUniformID(const Containers::String& name); - void SetTexture(int ID, Texture* texture); - void SetVector2(int ID, Math::Vector2* vector2); - void SetVector3(int ID, Math::Vector3* vector3); - void SetVector4(int ID, Math::Vector4* vector4); - void SetMatrix44(int ID, Math::Matrix44* matrix44); - void SetFloat(int ID, float value); - void SetInteger(int ID, int value); - void SetColor(int ID, Color color); - - UniformsInfo GetUniformInfo(int ID); - float GetUniformInfof(int ID); - int GetUniformInfoi(int ID); - Math::Vector2 GetUniformInfov2(int ID); - Math::Vector3 GetUniformInfov3(int ID); - Math::Vector4 GetUniformInfov4(int ID); - Math::Matrix44 GetUniformInfom44(int ID); - Texture* GetUniformInfotex(int ID); - Color GetUniformInfocol(int ID); + void SetTexture(uint ID, Texture* texture); + void SetVector2(uint ID, Math::Vector2* vector2); + void SetVector3(uint ID, Math::Vector3* vector3); + void SetVector4(uint ID, Math::Vector4* vector4); + void SetMatrix44(uint ID, Math::Matrix44* matrix44); + void SetFloat(uint ID, float value); + void SetInteger(uint ID, int value); + void SetColor(uint ID, Color color); + + UniformsInfo GetUniformInfo(uint ID); + float GetUniformInfof(uint ID); + int GetUniformInfoi(uint ID); + Math::Vector2 GetUniformInfov2(uint ID); + Math::Vector3 GetUniformInfov3(uint ID); + Math::Vector4 GetUniformInfov4(uint ID); + Math::Matrix44 GetUniformInfom44(uint ID); + Texture* GetUniformInfotex(uint ID); + Color GetUniformInfocol(uint ID); // ϴ @@ -98,6 +94,17 @@ namespace AsuraEngine private: + friend class MaterialFactory; + + Material(); + Material(const Material& src); + ~Material(); + + /// + /// + /// + uint mID; + /// /// /// @@ -114,38 +121,65 @@ namespace AsuraEngine bool mIsShared; //---------------------------------------------------------------------------------------------------- - - LUAX_DECL_FACTORY( Material ); - LUAX_DECL_METHOD( l_Clone ); + LUAX_DECL_FACTORY(Material); + + LUAX_DECL_METHOD(l_Clone); - LUAX_DECL_METHOD( l_SetShader ); + LUAX_DECL_METHOD(l_SetShader); - LUAX_DECL_METHOD( l_SetTexture ); - LUAX_DECL_METHOD( l_SetVector2 ); - LUAX_DECL_METHOD( l_SetVector3 ); - LUAX_DECL_METHOD( l_SetVector4 ); - LUAX_DECL_METHOD( l_SetMatrix44 ); - LUAX_DECL_METHOD( l_SetFloat ); - LUAX_DECL_METHOD( l_SetInteger ); - LUAX_DECL_METHOD( l_SetColor ); + LUAX_DECL_METHOD(l_SetTexture); + LUAX_DECL_METHOD(l_SetVector2); + LUAX_DECL_METHOD(l_SetVector3); + LUAX_DECL_METHOD(l_SetVector4); + LUAX_DECL_METHOD(l_SetMatrix44); + LUAX_DECL_METHOD(l_SetFloat); + LUAX_DECL_METHOD(l_SetInteger); + LUAX_DECL_METHOD(l_SetColor); - LUAX_DECL_METHOD( l_GetUniformInfo ); - LUAX_DECL_METHOD( l_GetUniformInfof ); - LUAX_DECL_METHOD( l_GetUniformInfoi ); - LUAX_DECL_METHOD( l_GetUniformInfov2 ); - LUAX_DECL_METHOD( l_GetUniformInfov3 ); - LUAX_DECL_METHOD( l_GetUniformInfov4 ); - LUAX_DECL_METHOD( l_GetUniformInfom44 ); - LUAX_DECL_METHOD( l_GetUniformInfotex ); - LUAX_DECL_METHOD( l_GetUniformInfocol ); + LUAX_DECL_METHOD(l_GetUniformInfo); + LUAX_DECL_METHOD(l_GetUniformInfof); + LUAX_DECL_METHOD(l_GetUniformInfoi); + LUAX_DECL_METHOD(l_GetUniformInfov2); + LUAX_DECL_METHOD(l_GetUniformInfov3); + LUAX_DECL_METHOD(l_GetUniformInfov4); + LUAX_DECL_METHOD(l_GetUniformInfom44); + LUAX_DECL_METHOD(l_GetUniformInfotex); + LUAX_DECL_METHOD(l_GetUniformInfocol); - LUAX_DECL_METHOD( l_SetVertexAttributes ); + LUAX_DECL_METHOD(l_SetVertexAttributes); }; class MaterialManager : public Manager { + public: + + private: + + /// + /// еimage + /// + Containers::Map<uint, Image*> mImages; + + /// + /// image·IDӳ䡣Դ.asrimageͨ·õimageԲеimageڴmapС + /// ɳimageֻͨIDȡԳҪID + /// + Containers::StringMap<uint> mImageIDs; + + }; + + class MaterialFactory : public Factory + { + public: + + /// + /// һmaterial + /// + Material* Clone(Material* src); + + Material* Create(); }; diff --git a/Source/Asura/Graphics/Mesh2DRenderer.h b/Source/Asura/Graphics/Mesh2DRenderer.h index e69de29..fcbfd2c 100644 --- a/Source/Asura/Graphics/Mesh2DRenderer.h +++ b/Source/Asura/Graphics/Mesh2DRenderer.h @@ -0,0 +1,19 @@ +#ifndef __AE_MESH2D_H__ +#define __AE_MESH2D_H__ + +#include "FileSystem/Asset.h" + +namespace AsuraEngine +{ + namespace Graphics + { + + class Mesh2D : public Filesystem::Asset + { + + }; + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Graphics/ParticleSystem.h b/Source/Asura/Graphics/ParticleSystem.h index 2c22608..078427a 100644 --- a/Source/Asura/Graphics/ParticleSystem.h +++ b/Source/Asura/Graphics/ParticleSystem.h @@ -8,6 +8,9 @@ namespace AsuraEngine namespace Graphics { + /// + /// ϵͳ + /// class ParticleSystem final : public Component { diff --git a/Source/Asura/Graphics/Prefab.cpp b/Source/Asura/Graphics/Prefab.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Source/Asura/Graphics/Prefab.cpp diff --git a/Source/Asura/Graphics/Prefab.h b/Source/Asura/Graphics/Prefab.h new file mode 100644 index 0000000..82a8da2 --- /dev/null +++ b/Source/Asura/Graphics/Prefab.h @@ -0,0 +1,30 @@ +#ifndef __AE_PREFAB_H__ +#define __AE_PREFAB_H__ + +#include "Manager.hpp" +#include "FileSystem/Asset.h" + +namespace AsuraEngine +{ + + /// + /// PrefabGameObject + /// + class Prefab : public Filesystem::Asset + { + + }; + + class PrefabManager : public Manager + { + + }; + + class PrefabFactory + { + + }; + +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Graphics/RenderTarget.h b/Source/Asura/Graphics/RenderTarget.h deleted file mode 100644 index b3f90cd..0000000 --- a/Source/Asura/Graphics/RenderTarget.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef __AE_RENDER_TARGET_H__ -#define __AE_RENDER_TARGET_H__ - -#include "Texture.h" - -namespace AsuraEngine -{ - namespace Graphics - { - - class RenderTarget : public Texture - { - public: - - - - }; - - } -} - -#endif
\ No newline at end of file diff --git a/Source/Asura/Graphics/Shader.h b/Source/Asura/Graphics/Shader.h index b1e9c7a..c3c67ad 100644 --- a/Source/Asura/Graphics/Shader.h +++ b/Source/Asura/Graphics/Shader.h @@ -3,6 +3,7 @@ #include "luax/luax.h" +#include "FileSystem/Asset.h" #include "Containers/Map.h" #include "Containers/StringMap.hpp" #include "Object.h" @@ -19,7 +20,7 @@ namespace AsuraEngine /// /// һshaderһڲʼ乲ijShaderuniformsͶݣֻuniforms location /// - class Shader final : public Object + class Shader final : public Filesystem::Asset { public: diff --git a/Source/Asura/Graphics/Sprite.h b/Source/Asura/Graphics/Sprite.h index 581ee87..b621f1b 100644 --- a/Source/Asura/Graphics/Sprite.h +++ b/Source/Asura/Graphics/Sprite.h @@ -14,7 +14,7 @@ namespace AsuraEngine /// /// SpriteǿimageĴimagesprite乲ݣspriteimageԣתŵȡ /// - class Sprite final : public Object + class Sprite final : public Filesystem::Asset { public: @@ -52,7 +52,7 @@ namespace AsuraEngine /// /// С /// - Math::Vector2 size; + Math::Vector2 mSize; /// /// image diff --git a/Source/Asura/Graphics/Texture.h b/Source/Asura/Graphics/Texture.h index cc015ef..8195fc9 100644 --- a/Source/Asura/Graphics/Texture.h +++ b/Source/Asura/Graphics/Texture.h @@ -1,7 +1,7 @@ #ifndef __AE_TEXTURE_H__ #define __AE_TEXTURE_H__ -#include "Component.h" +#include "Object.h" namespace AsuraEngine { @@ -11,7 +11,7 @@ namespace AsuraEngine /// /// 2Dࣩ2d meshrender targetбʹ /// - class Texture : public Component + class Texture : public Object { }; diff --git a/Source/Asura/Object.h b/Source/Asura/Object.h index 2511500..3dace26 100644 --- a/Source/Asura/Object.h +++ b/Source/Asura/Object.h @@ -6,6 +6,9 @@ namespace AsuraEngine { + /// + /// + /// class Object { public: diff --git a/Source/Asura/Physics/World.h b/Source/Asura/Physics/World.h index e69de29..7000351 100644 --- a/Source/Asura/Physics/World.h +++ b/Source/Asura/Physics/World.h @@ -0,0 +1,14 @@ +#ifndef __AE_WORLD_H__ +#define __AE_WORLD_H__ + +namespace AsuraEngine +{ + namespace Physics + { + + + + } +} + +#endif
\ No newline at end of file diff --git a/Source/Asura/Prefab.h b/Source/Asura/Prefab.h deleted file mode 100644 index 447a679..0000000 --- a/Source/Asura/Prefab.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __AE_PREFAB_H__ -#define __AE_PREFAB_H__ - -namespace AsuraEngine -{ - - class Prefab - { - - }; - -} - -#endif
\ No newline at end of file diff --git a/Source/Asura/Scene.h b/Source/Asura/Scene.h index c873751..742d872 100644 --- a/Source/Asura/Scene.h +++ b/Source/Asura/Scene.h @@ -1,6 +1,7 @@ #ifndef __AE_SCENE_H__ #define __AE_SCENE_H__ +#include "FileSystem/Asset.h" #include "Containers/Vector.hpp" #include "GameObject.h" @@ -10,10 +11,12 @@ namespace AsuraEngine /// /// Ϸ /// - class Scene + class Scene final : public Filesystem::Asset { public: + // + private: Containers::Vector<GameObject*> mGameObjects; |