コード例 #1
0
        public TestSceneGameplayCursor()
        {
            InputManager.ShowVisualCursorGuide = false;

            Add(cursor = new TauCursor(CreateBeatmap(new TauRuleset().RulesetInfo).BeatmapInfo.BaseDifficulty));

            AddStep("Reset cursor", () => { InputManager.MoveMouseTo(cursor, new Vector2(0, -50)); });
        }
コード例 #2
0
        public TauPlayfield(BeatmapDifficulty difficulty)
        {
            RelativeSizeAxes = Axes.None;
            cursor           = new TauCursor(difficulty);
            Anchor           = Anchor.Centre;
            Origin           = Anchor.Centre;
            Size             = new Vector2(768);

            AddRangeInternal(new Drawable[]
            {
                new VisualisationContainer(),
                new SkinnableDrawable(new TauSkinComponent(TauSkinComponents.Ring), _ => new PlayfieldPiece()),
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Child            = HitObjectContainer
                },
                judgementLayer = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                },
                kiaiExplosionContainer = new Container <KiaiHitExplosion>
                {
                    Name             = "Kiai hit explosions",
                    RelativeSizeAxes = Axes.Both,
                    FillMode         = FillMode.Fit,
                    Blending         = BlendingParameters.Additive,
                    Origin           = Anchor.Centre,
                    Anchor           = Anchor.Centre,
                },
                SliderParticleEmitter = new ParticleEmitter
                {
                    Name             = "Slider particle emitter",
                    RelativeSizeAxes = Axes.Both,
                }
            });

            hitPolicy  = new OrderedHitPolicy(HitObjectContainer);
            NewResult += onNewResult;

            var hitWindows = new TauHitWindows();

            foreach (var result in Enum.GetValues(typeof(HitResult)).OfType <HitResult>().Where(r => r > HitResult.None && hitWindows.IsHitResultAllowed(r)))
            {
                poolDictionary.Add(result, new DrawableJudgementPool(result, onJudgmentLoaded));
            }

            AddRangeInternal(poolDictionary.Values);

            SliderParticleEmitter.Vortices.Add(new Vortex
            {
                Speed    = 10,
                Scale    = new Vector2(10),
                Position = Extensions.GetCircularPosition(-40, 0),
            });
        }
コード例 #3
0
        public TestSceneGameplayCursor()
        {
            InputManager.ShowVisualCursorGuide = false;

            Add(new Circle
            {
                RelativeSizeAxes = Axes.Both,
                Colour           = Color4.Red.Opacity(0.25f),
                FillMode         = FillMode.Fit,
                FillAspectRatio  = 1,
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
            });

            Add(cursor = new TauCursor(CreateBeatmap(new TauRuleset().RulesetInfo).BeatmapInfo.Difficulty));

            AddStep("Reset cursor", () => { InputManager.MoveMouseTo(cursor, new Vector2(0, -50)); });
            AddStep("Hide paddle", () => { cursor.Hide(); });
            AddStep("Show paddle", () => { cursor.Show(); });
        }
コード例 #4
0
ファイル: TauPlayfield.cs プロジェクト: nyalter/tau
        public TauPlayfield(BeatmapDifficulty difficulty)
        {
            RelativeSizeAxes = Axes.None;
            cursor           = new TauCursor(difficulty);
            Anchor           = Anchor.Centre;
            Origin           = Anchor.Centre;
            Size             = new Vector2(768);

            AddRangeInternal(new Drawable[]
            {
                judgementLayer = new JudgementContainer <DrawableTauJudgement>
                {
                    RelativeSizeAxes = Axes.Both,
                    Depth            = 1,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                },
                new VisualisationContainer(),
                playfieldBackground = new Circle
                {
                    Colour           = Color4.Black,
                    RelativeSizeAxes = Axes.Both,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                },
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Children         = new Drawable[]
                    {
                        new CircularContainer
                        {
                            RelativeSizeAxes = Axes.Both,
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre,
                            Masking          = true,
                            BorderThickness  = 3,
                            BorderColour     = Color4.White,
                            Child            = new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                AlwaysPresent    = true,
                                Alpha            = 0,
                            }
                        },
                    }
                },
                HitObjectContainer,
                cursor,
                kiaiExplosionContainer = new Container <KiaiHitExplosion>
                {
                    Name             = "Kiai hit explosions",
                    RelativeSizeAxes = Axes.Both,
                    FillMode         = FillMode.Fit,
                    Blending         = BlendingParameters.Additive,
                    Origin           = Anchor.Centre,
                    Anchor           = Anchor.Centre,
                },
            });
        }
コード例 #5
0
ファイル: tauPlayfield.cs プロジェクト: Niroe/tau
        public TauPlayfield()
        {
            cursor = new TauCursor();

            AddRangeInternal(new Drawable[]
            {
                judgementLayer = new JudgementContainer <DrawableTauJudgement>
                {
                    RelativeSizeAxes = Axes.Both,
                    Depth            = 1,
                },
                new VisualisationContainer(),
                playfieldBackground = new Circle
                {
                    Colour           = Color4.Black,
                    RelativeSizeAxes = Axes.Both,
                    Size             = new Vector2(UNIVERSAL_SCALE),
                    FillAspectRatio  = 1,
                    FillMode         = FillMode.Fit,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                },
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Size             = new Vector2(UNIVERSAL_SCALE),
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Children         = new Drawable[]
                    {
                        new CircularContainer
                        {
                            RelativeSizeAxes = Axes.Both,
                            Anchor           = Anchor.Centre,
                            Origin           = Anchor.Centre,
                            Masking          = true,
                            FillMode         = FillMode.Fit,
                            FillAspectRatio  = 1, // 1:1 Aspect ratio to get a perfect circle
                            BorderThickness  = 3,
                            BorderColour     = Color4.White,
                            Child            = new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                AlwaysPresent    = true,
                                Alpha            = 0,
                            }
                        },
                    }
                },
                new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    FillMode         = FillMode.Fit,
                    FillAspectRatio  = 1,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Size             = new Vector2(UNIVERSAL_SCALE),
                    Children         = new Drawable[]
                    {
                        HitObjectContainer,
                    }
                },
                cursor,
                kiaiExplosionContainer = new Container <KiaiHitExplosion>
                {
                    Name             = "Kiai hit explosions",
                    RelativeSizeAxes = Axes.Both,
                    FillMode         = FillMode.Fit,
                    Blending         = BlendingParameters.Additive,
                    Origin           = Anchor.Centre,
                    Anchor           = Anchor.Centre,
                },
            });
        }