Browse Source

Removed timescale functions

This doesn’t really do anything to solve the timescale issues with
Fungus, so removing it for simplicity.
master
Chris Gregan 10 years ago
parent
commit
4b02c434fe
  1. 22
      Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt
  2. 9
      Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs

22
Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt vendored

@ -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)

9
Assets/Fungus/Thirdparty/FungusLua/Scripts/LuaUtils.cs vendored

@ -35,15 +35,6 @@ namespace Fungus
[Tooltip("The currently selected language in the string table. Affects variable substitution.")]
public string activeLanguage = "en";
/// <summary>
/// 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.
/// </summary>
[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;
/// <summary>
/// Lua script file which defines the global string table used for localisation.
/// </summary>

Loading…
Cancel
Save