|
R-Type
Distributed multiplayer game engine in C++
|
Classes | |
| struct | ComponentBinding |
| Information about a registered component. More... | |
| class | ComponentBindingHelper |
| Helper to simplify component registration. More... | |
Functions | |
| ComponentBindingHelper & | bindComponents (sol::state &lua, ecs::wrapper::ECSWorld *world) |
| Bind ECS component types to Lua. | |
| void | bindEntity (sol::state &lua, ecs::wrapper::ECSWorld *world, ComponentBindingHelper &helper) |
| Bind Entity wrapper class and operations to Lua. | |
| void | bindServerGame (sol::state &lua, ecs::wrapper::ECSWorld *world, LuaEngine *engine) |
| Bind server-specific game logic functions to Lua. | |
| void | bindWorld (sol::state &lua, ecs::wrapper::ECSWorld *world) |
| Bind ECS world operations to Lua. | |
Variables | |
| static ComponentBindingHelper | g_componentHelper |
| ComponentBindingHelper & scripting::bindings::bindComponents | ( | sol::state & | lua, |
| ecs::wrapper::ECSWorld * | world | ||
| ) |
Bind ECS component types to Lua.
Binds each component to Lua and registers it with the helper. To add a new component:
| lua | Reference to the Lua state |
| world | Pointer to the ECS world |
Definition at line 19 of file ComponentBindings.cpp.
References scripting::bindings::ComponentBindingHelper::clear(), g_componentHelper, ecs::Health::getCurrentHealth(), ecs::Velocity::getDirection(), ecs::Health::getInvincibilityTimer(), ecs::Health::getMaxHealth(), ecs::Transform::getPosition(), ecs::Transform::getRotation(), ecs::Velocity::getSpeed(), ecs::Health::isInvincible(), scripting::bindings::ComponentBindingHelper::registerComponent(), ecs::Health::setCurrentHealth(), ecs::Velocity::setDirection(), ecs::Health::setInvincibilityTimer(), ecs::Health::setInvincible(), ecs::Health::setMaxHealth(), ecs::Transform::setPosition(), ecs::Transform::setRotation(), and ecs::Velocity::setSpeed().
Referenced by scripting::LuaEngine::initializeBindings().

| void scripting::bindings::bindEntity | ( | sol::state & | lua, |
| ecs::wrapper::ECSWorld * | world, | ||
| ComponentBindingHelper & | helper | ||
| ) |
Bind Entity wrapper class and operations to Lua.
Uses ComponentBindingHelper to automatically generate get/has methods for all registered components.
| lua | Reference to the Lua state |
| world | Pointer to the ECS world |
| helper | The helper with all registered components |
Entity methods automatically bound:
Global functions:
Definition at line 10 of file EntityBindings.cpp.
References scripting::bindings::ComponentBindingHelper::applyEntityMethods(), scripting::bindings::ComponentBindingHelper::applyRemoveFunction(), ecs::wrapper::ECSWorld::destroyEntity(), ecs::wrapper::Entity::getAddress(), ecs::wrapper::Entity::isValid(), and LOG_INFO.
Referenced by scripting::LuaEngine::initializeBindings().

| void scripting::bindings::bindServerGame | ( | sol::state & | lua, |
| ecs::wrapper::ECSWorld * | world, | ||
| LuaEngine * | engine | ||
| ) |
Bind server-specific game logic functions to Lua.
Provides high-level game functions for:
| lua | Reference to the Lua state |
| world | Pointer to the ECS world |
| engine | Pointer to the LuaEngine (for callback registration) |
Definition at line 27 of file ServerGameBindings.cpp.
References ecs::wrapper::ECSWorld::createEntity(), ecs::DamageBoost, ecs::DoubleShot, ecs::WaveConfig::enemies, ecs::SpawnRequest::enemyType, ecs::FireRateBoost, ecs::wrapper::Entity::get(), ecs::wrapper::Entity::getAddress(), ecs::wrapper::Entity::has(), ecs::SpawnRequest::hasSpawned, ecs::SpawnRequest::health, ecs::HealthRegen, ecs::HomingShot, ecs::wrapper::Entity::isValid(), LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING, ecs::MaxHealthIncrease, ecs::MultiShot, ecs::PiercingShot, ecs::Spawner::queueSpawn(), ecs::SpawnRequest::scoreValue, ecs::SpawnRequest::scriptPath, ecs::Spawner::setConfig(), ecs::Shield, ecs::SpawnRequest::spawnDelay, ecs::WaveConfig::spawnInterval, ecs::SpeedBoost, ecs::TripleShot, ecs::wrapper::Entity::with(), ecs::SpawnRequest::x, and ecs::SpawnRequest::y.
Referenced by scripting::LuaEngine::initializeBindings().

| void scripting::bindings::bindWorld | ( | sol::state & | lua, |
| ecs::wrapper::ECSWorld * | world | ||
| ) |
Bind ECS world operations to Lua.
Provides global Lua functions for entity management and logging.
| lua | Reference to the Lua state |
| world | Pointer to the ECS world (must not be nullptr) |
Lua functions added:
Definition at line 10 of file WorldBindings.cpp.
References ecs::wrapper::ECSWorld::createEntity(), ecs::wrapper::ECSWorld::destroyEntity(), ecs::wrapper::ECSWorld::getEntity(), ecs::wrapper::Entity::isValid(), LOG_DEBUG, LOG_ERROR, and LOG_WARNING.
Referenced by scripting::LuaEngine::initializeBindings().

|
static |
Definition at line 17 of file ComponentBindings.cpp.
Referenced by bindComponents().