mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-01 17:28:00 +03:00

Treat functions as global that would previously be accessed through the GameFlow table. This does pollute the global environment in Lua a bit, but keeps it consistent with the functions in GameLogicScript, which are all accessed as globals. Add some default member initialisers. Remove WriteDefaults. Rename Intro to IntroImagePath and make it a std::string. Add some documentation for the functions of GameFlowScript. Fix some comments.
27 lines
966 B
C++
27 lines
966 B
C++
#include "framework.h"
|
|
#include "GameScriptLevel.h"
|
|
|
|
void GameScriptLevel::Register(sol::state* state)
|
|
{
|
|
state->new_usertype<GameScriptLevel>("Level",
|
|
sol::constructors<GameScriptLevel()>(),
|
|
"name", &GameScriptLevel::NameStringKey,
|
|
"script", &GameScriptLevel::ScriptFileName,
|
|
"fileName", &GameScriptLevel::FileName,
|
|
"loadScreen", &GameScriptLevel::LoadScreenFileName,
|
|
"ambientTrack", &GameScriptLevel::AmbientTrack,
|
|
"layer1", &GameScriptLevel::Layer1,
|
|
"layer2", &GameScriptLevel::Layer2,
|
|
"fog", &GameScriptLevel::Fog,
|
|
"horizon", &GameScriptLevel::Horizon,
|
|
"colAddHorizon", &GameScriptLevel::ColAddHorizon,
|
|
"storm", &GameScriptLevel::Storm,
|
|
"background", &GameScriptLevel::Background,
|
|
"weather", &GameScriptLevel::Weather,
|
|
"laraType", &GameScriptLevel::LaraType,
|
|
"rumble", &GameScriptLevel::Rumble,
|
|
"resetHub", &GameScriptLevel::ResetHub,
|
|
"mirror", &GameScriptLevel::Mirror,
|
|
"objects", &GameScriptLevel::InventoryObjects
|
|
);
|
|
}
|