mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 22:37:21 +08:00
Hook up the event to HitObjectComposer
This commit is contained in:
parent
3fb0b0b668
commit
2c13043c42
@ -132,6 +132,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
editorBeatmap = new EditorBeatmap<TObject>(playableBeatmap);
|
||||
editorBeatmap.HitObjectAdded += addHitObject;
|
||||
editorBeatmap.HitObjectRemoved += removeHitObject;
|
||||
editorBeatmap.StartTimeChanged += updateHitObject;
|
||||
|
||||
var dependencies = new DependencyContainer(parent);
|
||||
dependencies.CacheAs<IEditorBeatmap>(editorBeatmap);
|
||||
@ -162,12 +163,7 @@ namespace osu.Game.Rulesets.Edit
|
||||
});
|
||||
}
|
||||
|
||||
private void addHitObject(HitObject hitObject)
|
||||
{
|
||||
beatmapProcessor?.PreProcess();
|
||||
hitObject.ApplyDefaults(playableBeatmap.ControlPointInfo, playableBeatmap.BeatmapInfo.BaseDifficulty);
|
||||
beatmapProcessor?.PostProcess();
|
||||
}
|
||||
private void addHitObject(HitObject hitObject) => updateHitObject(hitObject);
|
||||
|
||||
private void removeHitObject(HitObject hitObject)
|
||||
{
|
||||
@ -175,6 +171,13 @@ namespace osu.Game.Rulesets.Edit
|
||||
beatmapProcessor?.PostProcess();
|
||||
}
|
||||
|
||||
private void updateHitObject(HitObject hitObject)
|
||||
{
|
||||
beatmapProcessor?.PreProcess();
|
||||
hitObject.ApplyDefaults(playableBeatmap.ControlPointInfo, playableBeatmap.BeatmapInfo.BaseDifficulty);
|
||||
beatmapProcessor?.PostProcess();
|
||||
}
|
||||
|
||||
public override IEnumerable<DrawableHitObject> HitObjects => drawableRulesetWrapper.Playfield.AllHitObjects;
|
||||
public override bool CursorInPlacementArea => drawableRulesetWrapper.Playfield.ReceivePositionalInputAt(inputManager.CurrentState.Mouse.Position);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user