diff options
author | chai <chaifix@163.com> | 2019-04-02 08:47:15 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-04-02 08:47:15 +0800 |
commit | 250e30d73f09e9da2b5a81d0fbae63744ae12a73 (patch) | |
tree | 0f55daf334c073e1779d7a1284799a2056aad714 /source/libs/asura-lib-framework/scripts/filesystem | |
parent | 66fe16dd5ed57ae958fc25158d0defae2e6fae6a (diff) |
*misc
Diffstat (limited to 'source/libs/asura-lib-framework/scripts/filesystem')
11 files changed, 100 insertions, 0 deletions
diff --git a/source/libs/asura-lib-framework/scripts/filesystem/animation_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/animation_loader.lua new file mode 100644 index 0000000..9c57c43 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/animation_loader.lua @@ -0,0 +1,10 @@ +require "AnimationManager" +require "Animation" + +local loader = AsuraEngine.Loader.New("animation") +local manager = AsuraEngine.AnimationManager +local Animation = AsuraEngine.Animation + +function AnimationLoader.OnLoad(asset) + local animation = AsuraEngine.Class() +end
\ No newline at end of file diff --git a/source/libs/asura-lib-framework/scripts/filesystem/asset.lua b/source/libs/asura-lib-framework/scripts/filesystem/asset.lua new file mode 100644 index 0000000..7cf3905 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/asset.lua @@ -0,0 +1,20 @@ +-- +-- 游戏资源类需要继承Asset类,引擎读取.asset文件寻找对应的loader加载进游戏生成对应的Asset派生类对象。对于脚本,不会 +-- 生成对应的对象,而是直接运行脚本将结果保存。 +-- +AsuraEngine.Asset = AsuraEngine.Class("Asset") + +local Asset = AsuraEngine.Asset + +function Asset.Ctor(self) + self.guid = nil +end + +--获得资源编号 +function Asset.GetGUID(self) + +end + +function Asset.GetAssetByGUID(guid) + +end
\ No newline at end of file diff --git a/source/libs/asura-lib-framework/scripts/filesystem/entity_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/entity_loader.lua new file mode 100644 index 0000000..39ae0d9 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/entity_loader.lua @@ -0,0 +1,5 @@ +local loader = AsuraEngine.Loader.New("entity") + +function loader.OnLoad(asset) + +end
\ No newline at end of file diff --git a/source/libs/asura-lib-framework/scripts/filesystem/image_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/image_loader.lua new file mode 100644 index 0000000..6b0bef7 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/image_loader.lua @@ -0,0 +1,13 @@ +require "graphics.image" +local loader = AsuraEngine.Loader.New("image") + +function loader.OnLoad(asset) + assert(asset ~= nil) + local path = asset.extern + local image = AusraEngine.Image.New(path) + if image == nil then + AsuraEngine.LogError("") + return + end + return image +end diff --git a/source/libs/asura-lib-framework/scripts/filesystem/loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/loader.lua new file mode 100644 index 0000000..e192e30 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/loader.lua @@ -0,0 +1,12 @@ +-- Assets loaders +AsuraEngine.Loader = {} +local Loader = AsuraEngine.Loader +Loader.Loaders = {} + +function Loader.New(type) + assert(Loader.Loaders[type] == nil) + local loader = {} + Loader[type] = loader + return loader +end + diff --git a/source/libs/asura-lib-framework/scripts/filesystem/material_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/material_loader.lua new file mode 100644 index 0000000..07ca4e9 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/material_loader.lua @@ -0,0 +1,7 @@ +require "MaterialManager" + +local loader = AsuraEngine.Loader.New("material") + +function loader.OnLoad(asset) + +end
\ No newline at end of file diff --git a/source/libs/asura-lib-framework/scripts/filesystem/path_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/path_loader.lua new file mode 100644 index 0000000..986e42c --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/path_loader.lua @@ -0,0 +1,9 @@ +require "Path/PathManager" + +local loader = AsuraEngine.Loader.New("path") + +function loader.OnLoad(asset) + if asset.type ~= "path" then + return nil + end +end
\ No newline at end of file diff --git a/source/libs/asura-lib-framework/scripts/filesystem/scene_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/scene_loader.lua new file mode 100644 index 0000000..45731f8 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/scene_loader.lua @@ -0,0 +1,7 @@ +local Scene = require "scene" + +local loader = AsuraEngine.Loader.New("scene") + +function loader.OnLoad(asset) + +end
\ No newline at end of file diff --git a/source/libs/asura-lib-framework/scripts/filesystem/script_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/script_loader.lua new file mode 100644 index 0000000..e93d903 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/script_loader.lua @@ -0,0 +1,5 @@ +local loader = AsuraEngine.Loader.New("script") + +function loader.OnLoad(asset) + +end
\ No newline at end of file diff --git a/source/libs/asura-lib-framework/scripts/filesystem/shader_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/shader_loader.lua new file mode 100644 index 0000000..12d88bb --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/shader_loader.lua @@ -0,0 +1,5 @@ +local loader = AsuraEngine.Loader.New("shader") + +function loader.OnLoad(asset) + +end
\ No newline at end of file diff --git a/source/libs/asura-lib-framework/scripts/filesystem/statemap_loader.lua b/source/libs/asura-lib-framework/scripts/filesystem/statemap_loader.lua new file mode 100644 index 0000000..e52e086 --- /dev/null +++ b/source/libs/asura-lib-framework/scripts/filesystem/statemap_loader.lua @@ -0,0 +1,7 @@ +require "ai/statemap_manager" +local loader = AsuraEngine.Loader.New("statemap") + +--载入statemap +function loader.OnLoad(asset) + +end
\ No newline at end of file |