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