From 4b02c434fed017a91d9e537b58e713e0b6d39073 Mon Sep 17 00:00:00 2001 From: Chris Gregan Date: Tue, 19 Apr 2016 23:22:52 +0100 Subject: [PATCH] Removed timescale functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This doesn’t really do anything to solve the timescale issues with Fungus, so removing it for simplicity. --- .../FungusLua/Resources/Lua/fungus.txt | 22 +------------------ .../Thirdparty/FungusLua/Scripts/LuaUtils.cs | 9 -------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt b/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt index 9229633c..171867d7 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt +++ b/Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt @@ -12,26 +12,6 @@ function M.inspect(v) print (inspect.inspect(v)) end -------- --- Time -------- - --- Returns the absolute time --- Use this timing function to work correctly with the Lua Environment's timeScale property -function M.gettime() - return M.luautils.getTime() -end - --- Returns the delta time this frame --- Use this timing function to work correctly with the Lua Environment's timeScale property -function M.getdeltatime() - return M.luautils.getDeltaTime() -end - -function M.settimescale(s) - M.luautils.timeScale = s -end - ------------- -- Coroutines ------------- @@ -46,7 +26,6 @@ end -- Waits until the lamda function provided returns true, or the timeout expires. -- Returns true if the function succeeded, or false if the timeout expired --- function M.waitfor(fn, timeoutduration) local t = M.gettime() while (not fn()) do @@ -128,6 +107,7 @@ function M.pass() end -- Fail an integration test (requires Unity Test Tools) +-- reason: Option string explaining why the test failed. function M.fail(reason) error( debug.traceback("Test failed", 2) ) M.test.fail(reason) diff --git a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs index 156ebdea..7f86a49c 100644 --- a/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs +++ b/Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs @@ -35,15 +35,6 @@ namespace Fungus [Tooltip("The currently selected language in the string table. Affects variable substitution.")] public string activeLanguage = "en"; - /// - /// Time scale factor to apply when running Lua scripts. - /// This allows pausing of time based operations by setting timescale to 0. - /// Use the GetTime() and GetDeltaTime() functions to get scaled time values. - /// If negative, then GetTime() and GetDeltaTime() return the same values as the standard Time class. - /// - [Tooltip("Time scale factor to apply when running Lua scripts. If negative then uses the same values as the standard Time class.")] - public float timeScale = -1f; - /// /// Lua script file which defines the global string table used for localisation. ///