mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:07:29 +08:00
Merge pull request #16080 from smoogipoo/fix-storyboard-start-time
Fix incorrect storyboard life time start with looping commands
This commit is contained in:
commit
04551ea61e
@ -85,11 +85,12 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
loopGroup.Scale.Add(Easing.None, -20000, -18000, 0, 1);
|
loopGroup.Scale.Add(Easing.None, -20000, -18000, 0, 1);
|
||||||
|
|
||||||
var target = addEventToLoop ? loopGroup : sprite.TimelineGroup;
|
var target = addEventToLoop ? loopGroup : sprite.TimelineGroup;
|
||||||
target.Alpha.Add(Easing.None, firstStoryboardEvent, firstStoryboardEvent + 500, 0, 1);
|
double targetTime = addEventToLoop ? 20000 : 0;
|
||||||
|
target.Alpha.Add(Easing.None, targetTime + firstStoryboardEvent, targetTime + firstStoryboardEvent + 500, 0, 1);
|
||||||
|
|
||||||
// these should be ignored due to being in the future.
|
// these should be ignored due to being in the future.
|
||||||
sprite.TimelineGroup.Alpha.Add(Easing.None, 18000, 20000, 0, 1);
|
sprite.TimelineGroup.Alpha.Add(Easing.None, 18000, 20000, 0, 1);
|
||||||
loopGroup.Alpha.Add(Easing.None, 18000, 20000, 0, 1);
|
loopGroup.Alpha.Add(Easing.None, 38000, 40000, 0, 1);
|
||||||
|
|
||||||
storyboard.GetLayer("Background").Add(sprite);
|
storyboard.GetLayer("Background").Add(sprite);
|
||||||
|
|
||||||
|
@ -33,10 +33,8 @@ namespace osu.Game.Storyboards
|
|||||||
|
|
||||||
foreach (var l in loops)
|
foreach (var l in loops)
|
||||||
{
|
{
|
||||||
if (!(l.EarliestDisplayedTime is double lEarliest))
|
if (l.EarliestDisplayedTime is double loopEarliestDisplayTime)
|
||||||
continue;
|
earliestStartTime = Math.Min(earliestStartTime, l.LoopStartTime + loopEarliestDisplayTime);
|
||||||
|
|
||||||
earliestStartTime = Math.Min(earliestStartTime, lEarliest);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (earliestStartTime < double.MaxValue)
|
if (earliestStartTime < double.MaxValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user