1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 17:07:38 +08:00

make target animation call more obvious

This commit is contained in:
WebFreak001 2018-12-06 12:48:11 +01:00
parent 3cb91979bd
commit 46b98702e1
2 changed files with 9 additions and 11 deletions

View File

@ -31,7 +31,7 @@ namespace osu.Game.Rulesets.Osu.Mods
public override void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
{
scoreProcessor.Health.ValueChanged += val => {
flashlight.Value = (float)val;
flashlight.AnimateTarget((float)val);
};
scoreProcessor.Combo.ValueChanged += val => {
if (val > 0 && val % 30 == 0)

View File

@ -305,17 +305,15 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
/// <summary>
/// Health between 0 and 1 for the blinds to base the width on. Will get animated for 200ms using out-quintic easing.
/// </summary>
public float Value
public void AnimateTarget(float value)
{
set
{
target = value;
this.TransformTo(nameof(easing), target, 200, Easing.OutQuint);
}
get
{
return target;
}
target = value;
this.TransformTo(nameof(easing), target, 200, Easing.OutQuint);
}
public float Target
{
get => target;
}
public Texture PanelTexture