Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion SharpPluginLoader.Core/Components/AnimationLayerComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,25 @@ public AnimationLayerComponent() { }
/// </summary>
public ref float Speed => ref GetRef<float>(0x11C);

/// <summary>
/// If locked, gets the locked speed of this animation layer.
/// </summary>
public float? LockedSpeed
{
get
{
if (SpeedLocks.TryGetValue(Instance, out float lockedSpeed))
return lockedSpeed;
return null;
}
}

/// <summary>
/// Gets or sets whether the animation is paused.
/// </summary>
public bool Paused
{
get => SpeedLocks.ContainsKey(Instance) && SpeedLocks[Instance] == 0f;
get => LockedSpeed == (float?)0f;
set
{
if (value) Pause();
Expand Down
Loading