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:
parent
3cb91979bd
commit
46b98702e1
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user