mirror of
https://github.com/4sval/FModel.git
synced 2026-04-25 15:39:01 -05:00
time multiplier
This commit is contained in:
parent
ad665a83b9
commit
b2e7de5a47
|
|
@ -1 +1 @@
|
||||||
Subproject commit 85b8bde53e4df6d4b0a8269dc2c6e0b25a5f44ac
|
Subproject commit 3cb7db7ca08cacb7b1ccd51ab3cba6a52117a39e
|
||||||
|
|
@ -20,6 +20,7 @@ public class TimeTracker : IDisposable
|
||||||
public bool IsActive;
|
public bool IsActive;
|
||||||
public float ElapsedTime;
|
public float ElapsedTime;
|
||||||
public float MaxElapsedTime;
|
public float MaxElapsedTime;
|
||||||
|
public int TimeMultiplier;
|
||||||
|
|
||||||
public TimeTracker()
|
public TimeTracker()
|
||||||
{
|
{
|
||||||
|
|
@ -29,7 +30,7 @@ public class TimeTracker : IDisposable
|
||||||
public void Update(float deltaSeconds)
|
public void Update(float deltaSeconds)
|
||||||
{
|
{
|
||||||
if (IsPaused || IsActive) return;
|
if (IsPaused || IsActive) return;
|
||||||
ElapsedTime += deltaSeconds;
|
ElapsedTime += deltaSeconds * TimeMultiplier;
|
||||||
if (ElapsedTime >= MaxElapsedTime) Reset(false);
|
if (ElapsedTime >= MaxElapsedTime) Reset(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -47,7 +48,11 @@ public class TimeTracker : IDisposable
|
||||||
{
|
{
|
||||||
IsPaused = false;
|
IsPaused = false;
|
||||||
ElapsedTime = 0.0f;
|
ElapsedTime = 0.0f;
|
||||||
if (doMet) MaxElapsedTime = 0.01f;
|
if (doMet)
|
||||||
|
{
|
||||||
|
MaxElapsedTime = 0.01f;
|
||||||
|
TimeMultiplier = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
|
||||||
|
|
@ -217,7 +217,9 @@ public class SnimGui
|
||||||
{
|
{
|
||||||
Layout("Animate With Rotation Only");ImGui.PushID(1);
|
Layout("Animate With Rotation Only");ImGui.PushID(1);
|
||||||
ImGui.Checkbox("", ref s.Renderer.AnimateWithRotationOnly);
|
ImGui.Checkbox("", ref s.Renderer.AnimateWithRotationOnly);
|
||||||
ImGui.PopID();Layout("Vertex Colors");ImGui.PushID(2);
|
ImGui.PopID();Layout("Time Multiplier");ImGui.PushID(2);
|
||||||
|
ImGui.DragInt("", ref s.Renderer.Options.Tracker.TimeMultiplier, 0.1f, 1, 8, "x%i", ImGuiSliderFlags.NoInput);
|
||||||
|
ImGui.PopID();Layout("Vertex Colors");ImGui.PushID(3);
|
||||||
var c = (int) s.Renderer.Color;
|
var c = (int) s.Renderer.Color;
|
||||||
ImGui.Combo("vertex_colors", ref c,
|
ImGui.Combo("vertex_colors", ref c,
|
||||||
"Default\0Sections\0Colors\0Normals\0Texture Coordinates\0");
|
"Default\0Sections\0Colors\0Normals\0Texture Coordinates\0");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user