예제 #1
0
        private void load(RulesetStore rulesets)
        {
            var rateAdjustClock = new StopwatchClock(true);

            framedClock = new FramedClock(rateAdjustClock);

            AddStep(@"circles", () => loadHitobjects(HitObjectType.Circle));
            AddStep(@"slider", () => loadHitobjects(HitObjectType.Slider));
            AddStep(@"spinner", () => loadHitobjects(HitObjectType.Spinner));

            AddToggleStep("Auto", state => { auto = state; loadHitobjects(mode); });
            AddSliderStep("Playback speed", 0.0, 2.0, 0.5, v => rateAdjustClock.Rate = v);

            framedClock.ProcessFrame();

            var clockAdjustContainer = new Container
            {
                RelativeSizeAxes = Axes.Both,
                Clock            = framedClock,
                Children         = new[]
                {
                    playfieldContainer = new OsuInputManager(rulesets.GetRuleset(0))
                    {
                        RelativeSizeAxes = Axes.Both
                    },
                    approachContainer = new Container {
                        RelativeSizeAxes = Axes.Both
                    }
                }
            };

            Add(clockAdjustContainer);
        }
예제 #2
0
        public void ApplyToDrawableRuleset(DrawableRuleset <OsuHitObject> drawableRuleset)
        {
            // Grab the input manager to disable the user's cursor, and for future use
            inputManager = (OsuInputManager)drawableRuleset.KeyBindingInputManager;
            inputManager.AllowUserCursorMovement = false;

            // Generate the replay frames the cursor should follow
            replayFrames = new OsuAutoGenerator(drawableRuleset.Beatmap).Generate().Frames.Cast <OsuReplayFrame>().ToList();
        }
예제 #3
0
 public void ApplyToDrawableRuleset(DrawableRuleset <OsuHitObject> drawableRuleset)
 {
     // grab the input manager for future use.
     osuInputManager = (OsuInputManager)drawableRuleset.KeyBindingInputManager;
 }
예제 #4
0
 public void ApplyToRulesetContainer(RulesetContainer <OsuHitObject> rulesetContainer)
 {
     // grab the input manager for future use.
     osuInputManager = (OsuInputManager)rulesetContainer.KeyBindingInputManager;
     osuInputManager.AllowUserPresses = false;
 }