mirror of
https://github.com/osukey/osukey.git
synced 2025-04-30 19:27:25 +09:00
WIP : replaced TransformBindableTo by VolumeTo
Currently, the VolumeTO calls taht use a fading does not do anything. calling VolumeTo calls pauseLoop.samplesContainer.TransformBindableTo(....), while i used to call pauseLoop.TransformBindableTo(....)
This commit is contained in:
parent
3c2870ea4b
commit
e8f23e35a5
@ -3,8 +3,10 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using NUnit.Framework.Internal;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Graphics.Audio;
|
||||||
using osu.Game.Audio;
|
using osu.Game.Audio;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
@ -44,8 +46,8 @@ namespace osu.Game.Screens.Play
|
|||||||
base.PopIn();
|
base.PopIn();
|
||||||
|
|
||||||
//SkinnableSound only plays a sound if its aggregate volume is > 0, so the volume must be turned up before playing it
|
//SkinnableSound only plays a sound if its aggregate volume is > 0, so the volume must be turned up before playing it
|
||||||
pauseLoop.TransformBindableTo(pauseLoop.Volume, 0.00001);
|
pauseLoop.VolumeTo(0.00001f);
|
||||||
pauseLoop.TransformBindableTo(pauseLoop.Volume, 1.0f, 400, Easing.InQuint);
|
pauseLoop.VolumeTo(1.0f, 400, Easing.InQuint);
|
||||||
pauseLoop.Play();
|
pauseLoop.Play();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,8 +55,9 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
|
||||||
pauseLoop.Stop();
|
var transformSeq = pauseLoop.VolumeTo(0.0f, 190, Easing.OutQuad );
|
||||||
pauseLoop.TransformBindableTo(pauseLoop.Volume, 0.0f);
|
transformSeq.Finally(_ => pauseLoop.Stop());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user