Made model/entity manifest a first class object

This commit is contained in:
2019-09-25 11:52:19 -05:00
parent f41078b14b
commit 954c6899be
6 changed files with 52 additions and 18 deletions

View File

@@ -52,7 +52,8 @@ class IMICFPS
hash = @assets[@asset_index]
case hash[:type]
when :model
ModelLoader.new(manifest_file: IMICFPS.assets_path + "/#{hash[:package]}/#{hash[:name]}/manifest.yaml", entity: @dummy_entity)
manifest = Manifest.new(manifest_file: IMICFPS.assets_path + "/#{hash[:package]}/#{hash[:name]}/manifest.yaml")
ModelLoader.new(manifest: manifest, entity: @dummy_entity)
when :shader
Shader.new(name: hash[:name], vertex: "shaders/vertex/#{hash[:name]}.glsl", fragment: "shaders/fragment/#{hash[:name]}.glsl")
else