You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
479 B
C#
19 lines
479 B
C#
using UnityEngine;
|
|
|
|
namespace IngameDebugConsole.Commands
|
|
{
|
|
public class TimeCommands
|
|
{
|
|
[ConsoleMethod( "time.scale", "Sets the Time.timeScale value" ), UnityEngine.Scripting.Preserve]
|
|
public static void SetTimeScale( float value )
|
|
{
|
|
Time.timeScale = Mathf.Max( value, 0f );
|
|
}
|
|
|
|
[ConsoleMethod( "time.scale", "Returns the current Time.timeScale value" ), UnityEngine.Scripting.Preserve]
|
|
public static float GetTimeScale()
|
|
{
|
|
return Time.timeScale;
|
|
}
|
|
}
|
|
} |