Example #1
0
        private void addGameplayComponents(Container target, WorkingBeatmap working)
        {
            var beatmapSkinProvider = new BeatmapSkinProvidingContainer(working.Skin);

            // the beatmapSkinProvider is used as the fallback source here to allow the ruleset-specific skin implementation
            // full access to all skin sources.
            var rulesetSkinProvider = new SkinProvidingContainer(ruleset.CreateLegacySkinProvider(beatmapSkinProvider));

            // load the skinning hierarchy first.
            // this is intentionally done in two stages to ensure things are in a loaded state before exposing the ruleset to skin sources.
            target.Add(new ScalingContainer(ScalingMode.Gameplay)
                       .WithChild(beatmapSkinProvider
                                  .WithChild(target = rulesetSkinProvider)));

            target.AddRange(new Drawable[]
            {
                DrawableRuleset,
                new ComboEffects(ScoreProcessor)
            });

            DrawableRuleset.FrameStableComponents.AddRange(new Drawable[]
            {
                ScoreProcessor,
                HealthProcessor,
                breakTracker = new BreakTracker(DrawableRuleset.GameplayStartTime, ScoreProcessor)
                {
                    Breaks = working.Beatmap.Breaks
                }
            });

            HealthProcessor.IsBreakTime.BindTo(breakTracker.IsBreakTime);
        }
Example #2
0
 private Drawable createGameplayComponents(WorkingBeatmap working, IBeatmap playableBeatmap) => new ScalingContainer(ScalingMode.Gameplay)
 {
     Children = new Drawable[]
     {
         DrawableRuleset.With(r =>
                              r.FrameStableComponents.Children = new Drawable[]
         {
             ScoreProcessor,
             HealthProcessor,
             new ComboEffects(ScoreProcessor),
             breakTracker = new BreakTracker(DrawableRuleset.GameplayStartTime, ScoreProcessor)
             {
                 Breaks = working.Beatmap.Breaks
             }
         }),
     }
 };