Hook up ScoreProcessor to Scoreoverlay etc.

This commit is contained in:
Dean Herbert
2016-11-29 21:28:43 +09:00
parent 9b243ccc23
commit 2947121e48
7 changed files with 95 additions and 21 deletions

View File

@ -13,9 +13,7 @@ namespace osu.Game.Modes.Objects.Drawables
{
public abstract class DrawableHitObject : Container, IStateful<ArmedState>
{
//todo: move to a more central implementation. this logic should not be at a drawable level.
public Action<DrawableHitObject, JudgementInfo> OnHit;
public Action<DrawableHitObject, JudgementInfo> OnMiss;
public event Action<DrawableHitObject, JudgementInfo> OnJudgement;
public Container<DrawableHitObject> ChildObjects;
@ -73,14 +71,14 @@ namespace osu.Game.Modes.Objects.Drawables
{
default:
State = ArmedState.Hit;
OnHit?.Invoke(this, Judgement);
break;
case HitResult.Miss:
State = ArmedState.Miss;
OnMiss?.Invoke(this, Judgement);
break;
}
OnJudgement?.Invoke(this, Judgement);
return true;
}