public OsuPlayfield() { InternalChildren = new Drawable[] { playfieldBorder = new PlayfieldBorder { RelativeSizeAxes = Axes.Both, Depth = 3 }, spinnerProxies = new ProxyContainer { RelativeSizeAxes = Axes.Both }, followPoints = new FollowPointRenderer { RelativeSizeAxes = Axes.Both, Depth = 2, }, judgementLayer = new JudgementContainer <DrawableOsuJudgement> { RelativeSizeAxes = Axes.Both, Depth = 1, }, // Todo: This should not exist, but currently helps to reduce LOH allocations due to unbinding skin source events on judgement disposal // Todo: Remove when hitobjects are properly pooled new SkinProvidingContainer(null) { Child = HitObjectContainer, }, approachCircles = new ProxyContainer { RelativeSizeAxes = Axes.Both, Depth = -1, }, }; hitPolicy = new OrderedHitPolicy(HitObjectContainer); CheckHittable = hitPolicy.IsHittable; var hitWindows = new OsuHitWindows(); foreach (var result in Enum.GetValues(typeof(HitResult)).OfType <HitResult>().Where(r => r > HitResult.None && hitWindows.IsHitResultAllowed(r))) { poolDictionary.Add(result, new DrawableJudgementPool(result)); } AddRangeInternal(poolDictionary.Values); NewResult += onNewResult; }
public OsuPlayfield() { Anchor = Anchor.Centre; Origin = Anchor.Centre; InternalChildren = new Drawable[] { playfieldBorder = new PlayfieldBorder { RelativeSizeAxes = Axes.Both }, spinnerProxies = new ProxyContainer { RelativeSizeAxes = Axes.Both }, FollowPoints = new FollowPointRenderer { RelativeSizeAxes = Axes.Both }, judgementLayer = new JudgementContainer <DrawableOsuJudgement> { RelativeSizeAxes = Axes.Both }, HitObjectContainer, judgementAboveHitObjectLayer = new Container { RelativeSizeAxes = Axes.Both }, approachCircles = new ProxyContainer { RelativeSizeAxes = Axes.Both }, }; HitPolicy = new StartTimeOrderedHitPolicy(); var hitWindows = new OsuHitWindows(); foreach (var result in Enum.GetValues(typeof(HitResult)).OfType <HitResult>().Where(r => r > HitResult.None && hitWindows.IsHitResultAllowed(r))) { poolDictionary.Add(result, new DrawableJudgementPool(result, onJudgementLoaded)); } AddRangeInternal(poolDictionary.Values); NewResult += onNewResult; }