Rearrangements; Audio support
This commit is contained in:
29
src/gamedata/GameData.cpp
Normal file
29
src/gamedata/GameData.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include <Ogre.h>
|
||||
#include "GameData.h"
|
||||
|
||||
namespace ECS
|
||||
{
|
||||
static flecs::world ecs;
|
||||
CharacterModule::CharacterModule(flecs::world &ecs)
|
||||
{
|
||||
ecs.component<Input>();
|
||||
ecs.add<Input>();
|
||||
ecs.system("HandleInput").kind(flecs::OnUpdate).run([](flecs::iter &it) {
|
||||
/* handle input */
|
||||
});
|
||||
}
|
||||
|
||||
void setup()
|
||||
{
|
||||
ecs.add<GameData>();
|
||||
ecs.import <CharacterModule>();
|
||||
}
|
||||
void update(float delta)
|
||||
{
|
||||
ecs.progress(delta);
|
||||
}
|
||||
flecs::world &get()
|
||||
{
|
||||
return ecs;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user