|
|
vor 13 Jahren | |
|---|---|---|
| .. | ||
| gameplay-api | vor 13 Jahren | |
| gameplay-luagen.xcodeproj | vor 13 Jahren | |
| src | vor 13 Jahren | |
| README.md | vor 13 Jahren | |
| gameplay-luagen.doxyfile | vor 13 Jahren | |
| gameplay-luagen.sln | vor 13 Jahren | |
| gameplay-luagen.vcxproj | vor 13 Jahren | |
| gameplay-luagen.vcxproj.filters | vor 13 Jahren | |
| gameplay-luagen.vcxproj.user | vor 13 Jahren | |
| generate-doxygen-xml.bat | vor 13 Jahren | |
To generate the Lua script bindings for gameplay, run the generate-doxygen-xml.bat (or .sh) script. Then, on Windows, open the gameplay-luagen Visual Studio solution and build and run the gameplay-luagen project. On Mac, open the gameplay-luagen XCode workspace and build and run the gameplay-luagen project.
There are also prebuilt binaries in the gameplay/bin folder.
There is no reasonable way to unload a Lua script (one would have to parse the script completely to find all global function and variable names and then set those global table entries to nil and invoke the garbage collector).
-- If you want to load the module at most once, add a line like this. if Module then return end
-- Declare the module Module. Module = {}
-- Declare a variable within the module. Module.a = 47
-- Declare a function within the module. function Module.myFunc() return Module.a + 17 end
Note: you can't pass an enum to a function that doesn't explicitly take an enum (i.e. Control::setTextColor, which takes an unsigned char). In these cases, you need to go look up the enum values and pass them directly.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.