35 lines
832 B
C++
35 lines
832 B
C++
#ifndef _SLOTS_MODULE_H_
|
|
#define _SLOTS_MODULE_H_
|
|
#include <flecs.h>
|
|
#include <Ogre.h>
|
|
namespace ECS
|
|
{
|
|
struct ParentSlot {
|
|
flecs::entity parent_e;
|
|
Ogre::String slot_name;
|
|
void createSlot(flecs::entity e);
|
|
void createCharacterSlot(flecs::entity e);
|
|
void removeSlot(flecs::entity e);
|
|
bool check() const;
|
|
bool parentIsValid();
|
|
Ogre::SceneNode *getSlotBase() const;
|
|
void addChild(Ogre::SceneNode *childNode);
|
|
void createSlotData(flecs::entity e);
|
|
};
|
|
struct ParentSlotData {
|
|
Ogre::String slot_name;
|
|
flecs::entity parent_e;
|
|
Ogre::SceneNode *parentNode;
|
|
};
|
|
struct ObjectSlots {
|
|
std::unordered_map<Ogre::String,
|
|
std::pair<Ogre::String, Ogre::SceneNode *> >
|
|
slots;
|
|
bool exists(const Ogre::String &name) const;
|
|
};
|
|
struct SlotsModule {
|
|
SlotsModule(flecs::world &ecs);
|
|
void createBoatSlots(flecs::entity e);
|
|
};
|
|
}
|
|
#endif |