Merge branch 'master' into lua_1.0.2

This commit is contained in:
hispidence 2022-09-03 16:54:42 +01:00
commit e16a98a8aa
246 changed files with 16974 additions and 15499 deletions

View file

@ -12,9 +12,14 @@ local InvID = Flow.InvID
local RotationAxis = Flow.RotationAxis
local ItemAction = Flow.ItemAction
-- These variables are unused for now.
-- Intro image is a splash screen which appears before actual loading screen.
-- If you don't want it to appear, just remove this line.
Flow.SetIntroImagePath("Screens\\main.jpg")
-- This image should be used for static title screen background (as in TR1-TR3).
-- For now it is not implemented.
Flow.SetTitleScreenImagePath("Screens\\main.jpg")
@ -38,7 +43,7 @@ Flow.AddLevel(title)
test = Level.new()
test.nameKey = "level_test"
test.scriptFile = "Scripts\\TestLevel.lua"
test.scriptFile = "Scripts\\New_Level.lua"
test.ambientTrack = "108"
test.levelFile = "Data\\TestLevel.ten"
test.loadScreenFile = "Screens\\rome.jpg"

30
Scripts/New_Level.lua Normal file
View file

@ -0,0 +1,30 @@
-- New level script file.
-- To include other script files, you can use require("filename") command.
local Util = require("Util")
Util.ShortenTENCalls()
-- Called when entering a level, either after leveljump, new game or loading game
LevelFuncs.OnStart = function() end
-- Called after loading from a save
LevelFuncs.OnLoad = function() end
-- Called after saving game
LevelFuncs.OnSave = function() end
-- Called on every frame of the game
-- dt stands for "delta time", and holds the time in seconds since the last call to OnControlPhase
LevelFuncs.OnControlPhase = function(dt) end
-- Called when level is ended, either after leveljump, quitting to title or loading game
LevelFuncs.OnEnd = function() end
-- An example function which prints a string and leaves it on screen for 1 second.
-- Argument should be typed in TE trigger manager window's argument text field.
LevelFuncs.PrintText = function(Triggerer, Argument)
local TestText = DisplayString(Argument, 100, 100, Color.new(250,250,250))
ShowString(TestText, 1)
end