mirror of
https://github.com/ppy/osu.git
synced 2026-06-04 21:38:30 +08:00
Move shared implementation to a named function
This commit is contained in:
@@ -55,8 +55,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
OriginalXBindable.BindValueChanged(_ => X = OriginalXBindable.Value + XOffsetBindable.Value);
|
||||
XOffsetBindable.BindValueChanged(_ => X = OriginalXBindable.Value + XOffsetBindable.Value, true);
|
||||
OriginalXBindable.BindValueChanged(updateXPosition);
|
||||
XOffsetBindable.BindValueChanged(updateXPosition, true);
|
||||
|
||||
ScaleBindable.BindValueChanged(scale =>
|
||||
{
|
||||
@@ -67,6 +67,11 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
||||
IndexInBeatmap.BindValueChanged(_ => UpdateComboColour());
|
||||
}
|
||||
|
||||
private void updateXPosition(ValueChangedEvent<float> _)
|
||||
{
|
||||
X = OriginalXBindable.Value + XOffsetBindable.Value;
|
||||
}
|
||||
|
||||
protected override void OnApply()
|
||||
{
|
||||
base.OnApply();
|
||||
|
||||
Reference in New Issue
Block a user