mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Update loop logic in line with framework changes
This commit is contained in:
@ -203,6 +203,8 @@ namespace osu.Game.Overlays.Notifications
|
||||
get { return pulsate; }
|
||||
set
|
||||
{
|
||||
if (pulsate == value) return;
|
||||
|
||||
pulsate = value;
|
||||
|
||||
pulsateLayer.ClearTransforms();
|
||||
@ -211,25 +213,12 @@ namespace osu.Game.Overlays.Notifications
|
||||
if (pulsate)
|
||||
{
|
||||
const float length = 1000;
|
||||
pulsateLayer.Transforms.Add(new TransformAlpha
|
||||
using (pulsateLayer.BeginLoopedSequece(length / 2))
|
||||
{
|
||||
StartTime = Time.Current,
|
||||
EndTime = Time.Current + length,
|
||||
StartValue = 1,
|
||||
EndValue = 0.4f,
|
||||
Easing = EasingTypes.In
|
||||
});
|
||||
pulsateLayer.Transforms.Add(new TransformAlpha
|
||||
{
|
||||
StartTime = Time.Current + length,
|
||||
EndTime = Time.Current + length * 2,
|
||||
StartValue = 0.4f,
|
||||
EndValue = 1,
|
||||
Easing = EasingTypes.Out
|
||||
});
|
||||
|
||||
//todo: figure why we can't add arbitrary delays at the end of loop.
|
||||
pulsateLayer.Loop(length * 2);
|
||||
pulsateLayer.FadeTo(0.4f, length, EasingTypes.In);
|
||||
using (pulsateLayer.BeginDelayedSequence(length))
|
||||
pulsateLayer.FadeTo(1, length, EasingTypes.Out);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user