Introduce AssetManager
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include <asset/asset_manager.h>
|
||||
#include <flecs.h>
|
||||
#include <input/input.h>
|
||||
#include <log/log.h>
|
||||
@@ -14,6 +15,13 @@ int main()
|
||||
|
||||
world.import <Window::WindowModule>();
|
||||
world.import <Input::InputModule>();
|
||||
world.import <Asset::AssetModule>();
|
||||
|
||||
Asset::AssetManager manager;
|
||||
manager.register_asset_type<int>(world);
|
||||
auto handle0 = manager.load<int>(world, "hi");
|
||||
auto handle1 = manager.load<int>(world, "hi");
|
||||
auto handle2 = manager.load<int>(world, "hi2");
|
||||
|
||||
#ifndef NDEBUG
|
||||
world.import <flecs::stats>();
|
||||
|
||||
Reference in New Issue
Block a user