#include "Components.h" #include "GameData.h" #include "BoatModule.h" #include "VehicleManagerModule.h" namespace ECS { VehicleManagerModule::VehicleManagerModule(flecs::world &ecs) { ecs.module(); ecs.import (); } flecs::entity VehicleManagerModule::createVehicleAtPosition( const Ogre::String &name, const Ogre::Vector3 &position, const Ogre::Quaternion &orientation) { flecs::entity vehicle = ECS::get().entity(); if (name == "boat") vehicle.set( { name + ".scene", position, orientation }); else OgreAssert(false, "unsupported type: " + name); return vehicle; } }