From 14c54b13021b8512f784fa9d943d7567f6ebf2f5 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 21 Jan 2019 20:26:33 +0800 Subject: *packer --- Source/Asura.Editor/Scripts/main.lua | 3 +++ Source/Asura.Engine/Audio/Source.cpp | 0 Source/Asura.Engine/Audio/Source.h | 0 Source/Asura.Framework/Audio/SoundPlayer.lua | 3 +++ Source/Asura.Framework/Filesystem/AnimationLoader.lua | 3 ++- Source/Asura.Framework/Framework.lua | 1 + Source/Asura.Framework/Graphics/Animation.lua | 3 ++- Source/Asura.Framework/Graphics/Camera.lua | 2 -- Source/Asura.Framework/Graphics/Material.lua | 12 ++++++++++-- Source/Asura.Framework/Graphics/Renderer.lua | 3 +++ Source/Asura.Packer/main.cpp | 11 +++++++++++ Source/Asura.Runner/main.cpp | 4 ++-- 12 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 Source/Asura.Editor/Scripts/main.lua delete mode 100644 Source/Asura.Engine/Audio/Source.cpp delete mode 100644 Source/Asura.Engine/Audio/Source.h create mode 100644 Source/Asura.Framework/Audio/SoundPlayer.lua create mode 100644 Source/Asura.Framework/Framework.lua create mode 100644 Source/Asura.Packer/main.cpp (limited to 'Source') diff --git a/Source/Asura.Editor/Scripts/main.lua b/Source/Asura.Editor/Scripts/main.lua new file mode 100644 index 0000000..045e6c3 --- /dev/null +++ b/Source/Asura.Editor/Scripts/main.lua @@ -0,0 +1,3 @@ +local Editor = require("Asura.Editor") + + diff --git a/Source/Asura.Engine/Audio/Source.cpp b/Source/Asura.Engine/Audio/Source.cpp deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura.Engine/Audio/Source.h b/Source/Asura.Engine/Audio/Source.h deleted file mode 100644 index e69de29..0000000 diff --git a/Source/Asura.Framework/Audio/SoundPlayer.lua b/Source/Asura.Framework/Audio/SoundPlayer.lua new file mode 100644 index 0000000..8bbeddb --- /dev/null +++ b/Source/Asura.Framework/Audio/SoundPlayer.lua @@ -0,0 +1,3 @@ +local SoundPlayer = AsuraEngine.Component.New("SoundPlayer") + +return SoundPlayer \ No newline at end of file diff --git a/Source/Asura.Framework/Filesystem/AnimationLoader.lua b/Source/Asura.Framework/Filesystem/AnimationLoader.lua index 5d19758..f1dee29 100644 --- a/Source/Asura.Framework/Filesystem/AnimationLoader.lua +++ b/Source/Asura.Framework/Filesystem/AnimationLoader.lua @@ -1,7 +1,8 @@ local AnimationLoader = AsuraEngine.Loader.New("animation") local AnimationManager = require "AnimationManager" +local Animation = require "Animation" -function AnimationLoader.Load(mat) +function AnimationLoader.Load(asset) local animation = AsuraEngine.Class() diff --git a/Source/Asura.Framework/Framework.lua b/Source/Asura.Framework/Framework.lua new file mode 100644 index 0000000..b465f78 --- /dev/null +++ b/Source/Asura.Framework/Framework.lua @@ -0,0 +1 @@ +require "" \ No newline at end of file diff --git a/Source/Asura.Framework/Graphics/Animation.lua b/Source/Asura.Framework/Graphics/Animation.lua index b73cdd8..8b52683 100644 --- a/Source/Asura.Framework/Graphics/Animation.lua +++ b/Source/Asura.Framework/Graphics/Animation.lua @@ -1,5 +1,6 @@ +--把animation asset加入默认资源 local Animation = AsuraEngine.Asset.New("animation") -return Animation \ No newline at end of file +AsuraEngine.Animation = Animation \ No newline at end of file diff --git a/Source/Asura.Framework/Graphics/Camera.lua b/Source/Asura.Framework/Graphics/Camera.lua index 4c18f96..41d4394 100644 --- a/Source/Asura.Framework/Graphics/Camera.lua +++ b/Source/Asura.Framework/Graphics/Camera.lua @@ -4,6 +4,4 @@ Camera.mIsOnScreen = false Camera.mIsCulling = false - - return Camera \ No newline at end of file diff --git a/Source/Asura.Framework/Graphics/Material.lua b/Source/Asura.Framework/Graphics/Material.lua index 5875efc..5f7a7fa 100644 --- a/Source/Asura.Framework/Graphics/Material.lua +++ b/Source/Asura.Framework/Graphics/Material.lua @@ -4,14 +4,22 @@ local Material = AsuraEngine.Class() function Material:Ctor() - + end function Material:ToAsset() end -function Material:GetUniform() +function Material:GetUniform(id, value) + +end + +function Material:SendFloat() + +end + +function Material:GetUniformID() end diff --git a/Source/Asura.Framework/Graphics/Renderer.lua b/Source/Asura.Framework/Graphics/Renderer.lua index e69de29..1e44c73 100644 --- a/Source/Asura.Framework/Graphics/Renderer.lua +++ b/Source/Asura.Framework/Graphics/Renderer.lua @@ -0,0 +1,3 @@ +local Renderer = Class() + +return Renderer \ No newline at end of file diff --git a/Source/Asura.Packer/main.cpp b/Source/Asura.Packer/main.cpp new file mode 100644 index 0000000..71687d2 --- /dev/null +++ b/Source/Asura.Packer/main.cpp @@ -0,0 +1,11 @@ +/* +assets编译器,做以下事情: +1) 删除脚本中的注释 +2) 删除脚本中的AsuraEditor调用 +3) 压缩 +*/ + +int main() +{ + +} \ No newline at end of file diff --git a/Source/Asura.Runner/main.cpp b/Source/Asura.Runner/main.cpp index 1e71d40..218b1a9 100644 --- a/Source/Asura.Runner/main.cpp +++ b/Source/Asura.Runner/main.cpp @@ -1,6 +1,6 @@ // 游戏会被打包成一个资源文件,runner读取并解析内容,运行游戏 - +// Runner只能读取由packer打包后的游戏文件,editor可以直接运行游戏assets。Runner是一个最小化的运行环境。 int main() { -} +} \ No newline at end of file -- cgit v1.1-26-g67d0