mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Change IsLooping to get-only
This commit is contained in:
@@ -167,11 +167,13 @@ namespace osu.Framework.Graphics.Transforms
|
||||
if (t.LoopCount > 0)
|
||||
t.LoopCount--;
|
||||
|
||||
if (t.IsLooping && t.LoopCount != 0)
|
||||
if (t.IsLooping)
|
||||
{
|
||||
int oldLoopCount = t.LoopCount;
|
||||
|
||||
if (tCanRewind)
|
||||
{
|
||||
t.IsLooping = false;
|
||||
t.LoopCount = 0;
|
||||
t = t.Clone();
|
||||
}
|
||||
|
||||
@@ -179,7 +181,8 @@ namespace osu.Framework.Graphics.Transforms
|
||||
t.Applied = false;
|
||||
t.HasStartValue = false;
|
||||
|
||||
t.IsLooping = true;
|
||||
if (tCanRewind)
|
||||
t.LoopCount = oldLoopCount;
|
||||
|
||||
t.StartTime += t.LoopDelay;
|
||||
t.EndTime += t.LoopDelay;
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace osu.Framework.Graphics.Transforms
|
||||
public double StartTime { get; internal set; }
|
||||
public double EndTime { get; internal set; }
|
||||
|
||||
public bool IsLooping { get; internal set; }
|
||||
public bool IsLooping => LoopCount == -1 || LoopCount > 0;
|
||||
public double LoopDelay { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -317,6 +317,7 @@ namespace osu.Framework.Graphics.Transforms
|
||||
double currentTransformTime = t.TargetTransformable.Time.Current;
|
||||
|
||||
int pushForwardCount = 0;
|
||||
|
||||
while (t.EndTime <= currentTransformTime)
|
||||
{
|
||||
t.StartTime += iterDuration;
|
||||
@@ -335,7 +336,6 @@ namespace osu.Framework.Graphics.Transforms
|
||||
|
||||
foreach (var t in sortedTransforms)
|
||||
{
|
||||
t.IsLooping = true;
|
||||
t.LoopDelay = iterDuration;
|
||||
|
||||
t.Applied = false;
|
||||
|
||||
Reference in New Issue
Block a user