1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-08 06:36:05 +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) public override void ApplyToScoreProcessor(ScoreProcessor scoreProcessor)
{ {
scoreProcessor.Health.ValueChanged += val => { scoreProcessor.Health.ValueChanged += val => {
flashlight.Value = (float)val; flashlight.AnimateTarget((float)val);
}; };
scoreProcessor.Combo.ValueChanged += val => { scoreProcessor.Combo.ValueChanged += val => {
if (val > 0 && val % 30 == 0) if (val > 0 && val % 30 == 0)

View File

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