diff options
author | chai <chaifix@163.com> | 2019-01-28 11:34:56 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-01-28 11:34:56 +0800 |
commit | 5e2c00b40695415e3beefa77868afd7315391665 (patch) | |
tree | faa5e4021bd2b55a9b51da842958f61bc094927f | |
parent | ce5343ec4e5766f6a7485649f7395d4e072bd706 (diff) |
*misc
22 files changed, 238 insertions, 192 deletions
diff --git a/Build/Asura.Framework/Asura.Framework.vcxproj b/Build/Asura.Framework/Asura.Framework.vcxproj index 7bbd532..7017e79 100644 --- a/Build/Asura.Framework/Asura.Framework.vcxproj +++ b/Build/Asura.Framework/Asura.Framework.vcxproj @@ -18,43 +18,6 @@ <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> - <ItemGroup> - <None Include="..\..\Source\Asura.Framework\ai\statemachine.lua" /> - <None Include="..\..\Source\Asura.Framework\audio\soundplayer.lua" /> - <None Include="..\..\Source\Asura.Framework\class.lua" /> - <None Include="..\..\Source\Asura.Framework\component.lua" /> - <None Include="..\..\Source\Asura.Framework\filesystem\animation_loader.lua" /> - <None Include="..\..\Source\Asura.Framework\filesystem\gameobject_loader.lua" /> - <None Include="..\..\Source\Asura.Framework\filesystem\loader.lua" /> - <None Include="..\..\Source\Asura.Framework\filesystem\material_loader.lua" /> - <None Include="..\..\Source\Asura.Framework\filesystem\path_loader.lua" /> - <None Include="..\..\Source\Asura.Framework\filesystem\scene_loader.lua" /> - <None Include="..\..\Source\Asura.Framework\framework.lua" /> - <None Include="..\..\Source\Asura.Framework\game.lua" /> - <None Include="..\..\Source\Asura.Framework\entity.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\animation.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\animator.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\camera.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\canvas_renderer.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\default_shaders.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\material.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\material_manager.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\mesh2d_renderer.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\particle_system.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\renderer.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\shape_renderer.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\sprite_batch_renderer.lua" /> - <None Include="..\..\Source\Asura.Framework\graphics\sprite_renderer.lua" /> - <None Include="..\..\Source\Asura.Framework\gui\button.lua" /> - <None Include="..\..\Source\Asura.Framework\gui\text.lua" /> - <None Include="..\..\Source\Asura.Framework\math\curve.lua" /> - <None Include="..\..\Source\Asura.Framework\object.lua" /> - <None Include="..\..\Source\Asura.Framework\path\path.lua" /> - <None Include="..\..\Source\Asura.Framework\path\path_calculator.lua" /> - <None Include="..\..\Source\Asura.Framework\path\path_manager.lua" /> - <None Include="..\..\Source\Asura.Framework\scene.lua" /> - <None Include="..\..\Source\Asura.Framework\transform.lua" /> - </ItemGroup> <PropertyGroup Label="Globals"> <VCProjectVersion>15.0</VCProjectVersion> <ProjectGuid>{A4A226CC-37DB-4EB7-BD6F-B344B7B6D53B}</ProjectGuid> diff --git a/Build/Asura.Framework/Asura.Framework.vcxproj.filters b/Build/Asura.Framework/Asura.Framework.vcxproj.filters index 322661c..9cd8510 100644 --- a/Build/Asura.Framework/Asura.Framework.vcxproj.filters +++ b/Build/Asura.Framework/Asura.Framework.vcxproj.filters @@ -1,120 +1,2 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="ai"> - <UniqueIdentifier>{ec999168-9049-4261-b25f-0849f622693e}</UniqueIdentifier> - </Filter> - <Filter Include="audio"> - <UniqueIdentifier>{9d892f8d-718b-4e11-a2ca-9f8448bb6a6a}</UniqueIdentifier> - </Filter> - <Filter Include="filesystem"> - <UniqueIdentifier>{19d37542-9fd8-4574-9a0b-4138478cc324}</UniqueIdentifier> - </Filter> - <Filter Include="graphics"> - <UniqueIdentifier>{4cea7479-5e16-4160-a2a8-7aba60b67a4a}</UniqueIdentifier> - </Filter> - <Filter Include="gui"> - <UniqueIdentifier>{ed48783f-af1d-408b-9c4c-27370a7afc69}</UniqueIdentifier> - </Filter> - <Filter Include="math"> - <UniqueIdentifier>{4ffc0215-40d8-49a9-ac4a-4ab4a920cf4b}</UniqueIdentifier> - </Filter> - <Filter Include="path"> - <UniqueIdentifier>{24457f19-3650-4efc-8a02-aae600f9a463}</UniqueIdentifier> - </Filter> - <Filter Include="physics"> - <UniqueIdentifier>{35ae97cc-3f02-420b-8200-0cf78832581a}</UniqueIdentifier> - </Filter> - </ItemGroup> - <ItemGroup> - <None Include="..\..\Source\Asura.Framework\class.lua" /> - <None Include="..\..\Source\Asura.Framework\component.lua" /> - <None Include="..\..\Source\Asura.Framework\framework.lua" /> - <None Include="..\..\Source\Asura.Framework\game.lua" /> - <None Include="..\..\Source\Asura.Framework\object.lua" /> - <None Include="..\..\Source\Asura.Framework\scene.lua" /> - <None Include="..\..\Source\Asura.Framework\transform.lua" /> - <None Include="..\..\Source\Asura.Framework\ai\statemachine.lua"> - <Filter>ai</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\audio\soundplayer.lua"> - <Filter>audio</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\filesystem\loader.lua"> - <Filter>filesystem</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\animation.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\animator.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\camera.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\material.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\renderer.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\gui\button.lua"> - <Filter>gui</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\gui\text.lua"> - <Filter>gui</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\math\curve.lua"> - <Filter>math</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\path\path.lua"> - <Filter>path</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\sprite_renderer.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\sprite_batch_renderer.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\shape_renderer.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\particle_system.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\mesh2d_renderer.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\material_manager.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\default_shaders.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\graphics\canvas_renderer.lua"> - <Filter>graphics</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\filesystem\animation_loader.lua"> - <Filter>filesystem</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\filesystem\gameobject_loader.lua"> - <Filter>filesystem</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\filesystem\material_loader.lua"> - <Filter>filesystem</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\filesystem\path_loader.lua"> - <Filter>filesystem</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\filesystem\scene_loader.lua"> - <Filter>filesystem</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\path\path_calculator.lua"> - <Filter>path</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\path\path_manager.lua"> - <Filter>path</Filter> - </None> - <None Include="..\..\Source\Asura.Framework\entity.lua" /> - </ItemGroup> -</Project>
\ No newline at end of file +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
\ No newline at end of file diff --git a/Build/Asura.sln b/Build/Asura.sln index a5aba01..e4c85ef 100644 --- a/Build/Asura.sln +++ b/Build/Asura.sln @@ -45,6 +45,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OpenAL", "3rdParty\OpenAL\O EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpg123", "3rdParty\mpg123\mpg123.vcxproj", "{83E0897A-E2F4-4057-8077-59C4A0C38E56}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Asura", "Asura\Asura.vcxproj", "{8C1B90A5-8757-4197-9FB2-A38A7EA75849}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 @@ -205,6 +207,14 @@ Global {83E0897A-E2F4-4057-8077-59C4A0C38E56}.Release|x64.Build.0 = Release|x64 {83E0897A-E2F4-4057-8077-59C4A0C38E56}.Release|x86.ActiveCfg = Release|Win32 {83E0897A-E2F4-4057-8077-59C4A0C38E56}.Release|x86.Build.0 = Release|Win32 + {8C1B90A5-8757-4197-9FB2-A38A7EA75849}.Debug|x64.ActiveCfg = Debug|x64 + {8C1B90A5-8757-4197-9FB2-A38A7EA75849}.Debug|x64.Build.0 = Debug|x64 + {8C1B90A5-8757-4197-9FB2-A38A7EA75849}.Debug|x86.ActiveCfg = Debug|Win32 + {8C1B90A5-8757-4197-9FB2-A38A7EA75849}.Debug|x86.Build.0 = Debug|Win32 + {8C1B90A5-8757-4197-9FB2-A38A7EA75849}.Release|x64.ActiveCfg = Release|x64 + {8C1B90A5-8757-4197-9FB2-A38A7EA75849}.Release|x64.Build.0 = Release|x64 + {8C1B90A5-8757-4197-9FB2-A38A7EA75849}.Release|x86.ActiveCfg = Release|Win32 + {8C1B90A5-8757-4197-9FB2-A38A7EA75849}.Release|x86.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Build/Asura/Asura.vcxproj b/Build/Asura/Asura.vcxproj new file mode 100644 index 0000000..6249892 --- /dev/null +++ b/Build/Asura/Asura.vcxproj @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <ItemGroup Label="ProjectConfigurations"> + <ProjectConfiguration Include="Debug|Win32"> + <Configuration>Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|Win32"> + <Configuration>Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Debug|x64"> + <Configuration>Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="Release|x64"> + <Configuration>Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + </ItemGroup> + <PropertyGroup Label="Globals"> + <VCProjectVersion>15.0</VCProjectVersion> + <ProjectGuid>{8C1B90A5-8757-4197-9FB2-A38A7EA75849}</ProjectGuid> + <RootNamespace>Asura</RootNamespace> + <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>true</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> + <ConfigurationType>Application</ConfigurationType> + <UseDebugLibraries>false</UseDebugLibraries> + <PlatformToolset>v141</PlatformToolset> + <WholeProgramOptimization>true</WholeProgramOptimization> + <CharacterSet>MultiByte</CharacterSet> + </PropertyGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> + <ImportGroup Label="ExtensionSettings"> + </ImportGroup> + <ImportGroup Label="Shared"> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + </ImportGroup> + <PropertyGroup Label="UserMacros" /> + <PropertyGroup /> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <SDLCheck>true</SDLCheck> + <ConformanceMode>true</ConformanceMode> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <SDLCheck>true</SDLCheck> + <ConformanceMode>true</ConformanceMode> + </ClCompile> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <ConformanceMode>true</ConformanceMode> + </ClCompile> + <Link> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> + <ClCompile> + <WarningLevel>Level3</WarningLevel> + <Optimization>MaxSpeed</Optimization> + <FunctionLevelLinking>true</FunctionLevelLinking> + <IntrinsicFunctions>true</IntrinsicFunctions> + <SDLCheck>true</SDLCheck> + <ConformanceMode>true</ConformanceMode> + </ClCompile> + <Link> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <OptimizeReferences>true</OptimizeReferences> + </Link> + </ItemDefinitionGroup> + <ItemGroup> + </ItemGroup> + <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> + <ImportGroup Label="ExtensionTargets"> + </ImportGroup> +</Project>
\ No newline at end of file diff --git a/Build/Asura/Asura.vcxproj.filters b/Build/Asura/Asura.vcxproj.filters new file mode 100644 index 0000000..9cd8510 --- /dev/null +++ b/Build/Asura/Asura.vcxproj.filters @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />
\ No newline at end of file diff --git a/Build/Asura/Asura.vcxproj.user b/Build/Asura/Asura.vcxproj.user new file mode 100644 index 0000000..be25078 --- /dev/null +++ b/Build/Asura/Asura.vcxproj.user @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup /> +</Project>
\ No newline at end of file diff --git a/Source/Asura.Framework/Filesystem/Loader.lua b/Source/Asura.Framework/Filesystem/Loader.lua index 2d1e8cf..c7b8b8a 100644 --- a/Source/Asura.Framework/Filesystem/Loader.lua +++ b/Source/Asura.Framework/Filesystem/Loader.lua @@ -4,9 +4,7 @@ local Loader = AsuraEngine.Loader Loader.Loaders = {} function Loader.New(type) - if Loader.Loaders[type] ~= nil then - return Loader.Loaders[type] - end + assert(Loader.Loaders[type] == nil) local loader = {} Loader[type] = loader return loader diff --git a/Source/Asura.Framework/Graphics/Animation.lua b/Source/Asura.Framework/Graphics/Animation.lua index 8b52683..c4ff33b 100644 --- a/Source/Asura.Framework/Graphics/Animation.lua +++ b/Source/Asura.Framework/Graphics/Animation.lua @@ -1,6 +1,3 @@ ---animation assetĬԴ -local Animation = AsuraEngine.Asset.New("animation") +local Animation = AsuraEngine.Asset.Sub("Animation") +AsuraEngine.Animation = Animation - - -AsuraEngine.Animation = Animation
\ No newline at end of file diff --git a/Source/Asura.Framework/Graphics/Material.lua b/Source/Asura.Framework/Graphics/Material.lua index e50b273..01f8688 100644 --- a/Source/Asura.Framework/Graphics/Material.lua +++ b/Source/Asura.Framework/Graphics/Material.lua @@ -6,6 +6,10 @@ function Material:Ctor() self.isShared = false end +function Material.Clone(self) + +end + function Material:ToAsset() end @@ -14,10 +18,26 @@ function Material:GetUniform(name) end -function Material:SetFloat() +function Material:SetFloat(uniform, value) end +function Material:SetTexture(uniform, tex) + +end + +function Material:SetInteger(unifrom, value) + +end + +function Material:SetVec2(uniform, value) + +end + +function Material:SetMat44(uniform, value) + +end + function Material:GetUniformID() end diff --git a/Source/Asura.Framework/Graphics/Renderer.lua b/Source/Asura.Framework/Graphics/Renderer.lua index 1e44c73..9e75026 100644 --- a/Source/Asura.Framework/Graphics/Renderer.lua +++ b/Source/Asura.Framework/Graphics/Renderer.lua @@ -1,3 +1,9 @@ -local Renderer = Class() +local Renderer = AsuraEngine.Component.Sub("Renderer") +AsuraEngine.Renderer = Renderer + +--取材质,如果是shared,那么从此材质clone一个 +function Renderer.GetMaterial(self) + +end return Renderer
\ No newline at end of file diff --git a/Source/Asura.Framework/Graphics/particle_system.lua b/Source/Asura.Framework/Graphics/particle_system.lua index 21c35b8..a5f8015 100644 --- a/Source/Asura.Framework/Graphics/particle_system.lua +++ b/Source/Asura.Framework/Graphics/particle_system.lua @@ -1,3 +1,6 @@ ---ϵͳһ +local ParticleSystem = AsuraEngine.Component.Sub("ParticleSystem") +AsuraEngine.ParticleSystem = ParticleSystem -local ParticleSystem +function ParticleSystem.Ctor(self) + +end diff --git a/Source/Asura.Framework/Graphics/sprite_renderer.lua b/Source/Asura.Framework/Graphics/sprite_renderer.lua index 79177ba..1cbebd7 100644 --- a/Source/Asura.Framework/Graphics/sprite_renderer.lua +++ b/Source/Asura.Framework/Graphics/sprite_renderer.lua @@ -1,7 +1,8 @@ -local SpriteRenderer = Class() +require "graphics.renderer" -function SpriteRenderer:OnRender() - -end +local SpriteRenderer = AsuraEngine.Renderer.Sub("Spriterenderer") +AsuraEngine.SpriteRenderer = SpriteRenderer -return SpriteRenderer
\ No newline at end of file +function SpriteRenderer:OnRender() + +end diff --git a/Source/Asura.Framework/filesystem/asset.lua b/Source/Asura.Framework/filesystem/asset.lua index 09b4be3..b5f0664 100644 --- a/Source/Asura.Framework/filesystem/asset.lua +++ b/Source/Asura.Framework/filesystem/asset.lua @@ -5,3 +5,7 @@ AsuraEngine.Asset = Asset function Asset.GetGUID(self) end + +function Asset.GetAssetByGUID(guid) + +end
\ No newline at end of file diff --git a/Source/Asura.Framework/filesystem/loader.lua b/Source/Asura.Framework/filesystem/loader.lua index 2d1e8cf..c7b8b8a 100644 --- a/Source/Asura.Framework/filesystem/loader.lua +++ b/Source/Asura.Framework/filesystem/loader.lua @@ -4,9 +4,7 @@ local Loader = AsuraEngine.Loader Loader.Loaders = {} function Loader.New(type) - if Loader.Loaders[type] ~= nil then - return Loader.Loaders[type] - end + assert(Loader.Loaders[type] == nil) local loader = {} Loader[type] = loader return loader diff --git a/Source/Asura.Framework/filesystem/script_loader.lua b/Source/Asura.Framework/filesystem/script_loader.lua new file mode 100644 index 0000000..a85dea6 --- /dev/null +++ b/Source/Asura.Framework/filesystem/script_loader.lua @@ -0,0 +1,5 @@ +local loader = AsuraEngine.Loader.New("script") + +function loader.Load(asset) + +end
\ No newline at end of file diff --git a/Source/Asura.Framework/graphics/animation.lua b/Source/Asura.Framework/graphics/animation.lua index 8b52683..c4ff33b 100644 --- a/Source/Asura.Framework/graphics/animation.lua +++ b/Source/Asura.Framework/graphics/animation.lua @@ -1,6 +1,3 @@ ---animation assetĬԴ -local Animation = AsuraEngine.Asset.New("animation") +local Animation = AsuraEngine.Asset.Sub("Animation") +AsuraEngine.Animation = Animation - - -AsuraEngine.Animation = Animation
\ No newline at end of file diff --git a/Source/Asura.Framework/graphics/canvas.lua b/Source/Asura.Framework/graphics/canvas.lua index b0a2cfb..0b880c5 100644 --- a/Source/Asura.Framework/graphics/canvas.lua +++ b/Source/Asura.Framework/graphics/canvas.lua @@ -14,5 +14,3 @@ end function Canvas.OnDisable(self) end - - diff --git a/Source/Asura.Framework/graphics/material.lua b/Source/Asura.Framework/graphics/material.lua index e50b273..01f8688 100644 --- a/Source/Asura.Framework/graphics/material.lua +++ b/Source/Asura.Framework/graphics/material.lua @@ -6,6 +6,10 @@ function Material:Ctor() self.isShared = false end +function Material.Clone(self) + +end + function Material:ToAsset() end @@ -14,10 +18,26 @@ function Material:GetUniform(name) end -function Material:SetFloat() +function Material:SetFloat(uniform, value) end +function Material:SetTexture(uniform, tex) + +end + +function Material:SetInteger(unifrom, value) + +end + +function Material:SetVec2(uniform, value) + +end + +function Material:SetMat44(uniform, value) + +end + function Material:GetUniformID() end diff --git a/Source/Asura.Framework/graphics/mesh2d.lua b/Source/Asura.Framework/graphics/mesh2d.lua index e69de29..1c53608 100644 --- a/Source/Asura.Framework/graphics/mesh2d.lua +++ b/Source/Asura.Framework/graphics/mesh2d.lua @@ -0,0 +1,6 @@ +local Mesh2D = AsuraEngine.Asset.Sub("Mesh2D") +AsuraEngine.Mesh2D = Mesh2D + +function Mesh2D.Ctor(self) + +end
\ No newline at end of file diff --git a/Source/Asura.Framework/graphics/particle_system.lua b/Source/Asura.Framework/graphics/particle_system.lua index 21c35b8..a5f8015 100644 --- a/Source/Asura.Framework/graphics/particle_system.lua +++ b/Source/Asura.Framework/graphics/particle_system.lua @@ -1,3 +1,6 @@ ---ϵͳһ +local ParticleSystem = AsuraEngine.Component.Sub("ParticleSystem") +AsuraEngine.ParticleSystem = ParticleSystem -local ParticleSystem +function ParticleSystem.Ctor(self) + +end diff --git a/Source/Asura.Framework/graphics/renderer.lua b/Source/Asura.Framework/graphics/renderer.lua index 1e44c73..9e75026 100644 --- a/Source/Asura.Framework/graphics/renderer.lua +++ b/Source/Asura.Framework/graphics/renderer.lua @@ -1,3 +1,9 @@ -local Renderer = Class() +local Renderer = AsuraEngine.Component.Sub("Renderer") +AsuraEngine.Renderer = Renderer + +--取材质,如果是shared,那么从此材质clone一个 +function Renderer.GetMaterial(self) + +end return Renderer
\ No newline at end of file diff --git a/Source/Asura.Framework/graphics/sprite_renderer.lua b/Source/Asura.Framework/graphics/sprite_renderer.lua index 79177ba..1cbebd7 100644 --- a/Source/Asura.Framework/graphics/sprite_renderer.lua +++ b/Source/Asura.Framework/graphics/sprite_renderer.lua @@ -1,7 +1,8 @@ -local SpriteRenderer = Class() +require "graphics.renderer" -function SpriteRenderer:OnRender() - -end +local SpriteRenderer = AsuraEngine.Renderer.Sub("Spriterenderer") +AsuraEngine.SpriteRenderer = SpriteRenderer -return SpriteRenderer
\ No newline at end of file +function SpriteRenderer:OnRender() + +end |