Beispiel #1
0
 public DrawableDrumRoll(DrumRoll drumRoll)
     : base(drumRoll)
 {
     RelativeSizeAxes            = Axes.Y;
     MainPiece.Add(tickContainer = new Container <DrawableDrumRollTick> {
         RelativeSizeAxes = Axes.Both
     });
 }
Beispiel #2
0
        public DrawableDrumRoll(DrumRoll drumRoll)
            : base(drumRoll)
        {
            foreach (var tick in drumRoll.Ticks)
            {
                var newTick = new DrawableDrumRollTick(tick)
                {
                    X = (float)((tick.StartTime - HitObject.StartTime) / HitObject.Duration)
                };

                newTick.OnJudgement += onTickJudgement;

                AddNested(newTick);
                MainPiece.Add(newTick);
            }
        }
Beispiel #3
0
        public DrawableDrumRoll(DrumRoll drumRoll)
            : base(drumRoll)
        {
            RelativeSizeAxes = Axes.Y;

            Container <DrawableDrumRollTick> tickContainer;

            MainPiece.Add(tickContainer = new Container <DrawableDrumRollTick> {
                RelativeSizeAxes = Axes.Both
            });

            foreach (var tick in drumRoll.NestedHitObjects.OfType <DrumRollTick>())
            {
                var newTick = new DrawableDrumRollTick(tick);
                newTick.OnNewResult += onNewTickResult;

                AddNested(newTick);
                tickContainer.Add(newTick);
            }
        }
Beispiel #4
0
        public DrawableDrumRoll(DrumRoll drumRoll)
            : base(drumRoll)
        {
            Width = (float)HitObject.Duration;

            Container <DrawableDrumRollTick> tickContainer;

            MainPiece.Add(tickContainer = new Container <DrawableDrumRollTick>
            {
                RelativeSizeAxes    = Axes.Both,
                RelativeChildOffset = new Vector2((float)HitObject.StartTime, 0),
                RelativeChildSize   = new Vector2((float)HitObject.Duration, 1)
            });

            foreach (var tick in drumRoll.NestedHitObjects.OfType <DrumRollTick>())
            {
                var newTick = new DrawableDrumRollTick(tick);
                newTick.OnJudgement += onTickJudgement;

                AddNested(newTick);
                tickContainer.Add(newTick);
            }
        }
Beispiel #5
0
 public DrawableRimHitStrong(Hit hit)
     : base(hit)
 {
     MainPiece.Add(new RimHitSymbolPiece());
 }
Beispiel #6
0
 public DrawableCentreHit(Hit hit)
     : base(hit)
 {
     MainPiece.Add(new CentreHitSymbolPiece());
 }
Beispiel #7
0
        public DrawableSwell(Swell swell)
            : base(swell)
        {
            FillMode = FillMode.Fit;

            Content.Add(bodyContainer = new Container
            {
                RelativeSizeAxes = Axes.Both,
                Depth            = 1,
                Children         = new Drawable[]
                {
                    expandingRing = new CircularContainer
                    {
                        Name             = "Expanding ring",
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        Alpha            = 0,
                        RelativeSizeAxes = Axes.Both,
                        Blending         = BlendingMode.Additive,
                        Masking          = true,
                        Children         = new[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Alpha            = inner_ring_alpha,
                            }
                        }
                    },
                    targetRing = new CircularContainer
                    {
                        Name             = "Target ring (thick border)",
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both,
                        Masking          = true,
                        BorderThickness  = target_ring_thick_border,
                        Blending         = BlendingMode.Additive,
                        Children         = new Drawable[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Alpha            = 0,
                                AlwaysPresent    = true
                            },
                            new CircularContainer
                            {
                                Name             = "Target ring (thin border)",
                                Anchor           = Anchor.Centre,
                                Origin           = Anchor.Centre,
                                RelativeSizeAxes = Axes.Both,
                                Masking          = true,
                                BorderThickness  = target_ring_thin_border,
                                BorderColour     = Color4.White,
                                Children         = new[]
                                {
                                    new Box
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Alpha            = 0,
                                        AlwaysPresent    = true
                                    }
                                }
                            }
                        }
                    }
                }
            });

            MainPiece.Add(symbol = new SwellSymbolPiece());
        }
Beispiel #8
0
        public DrawableSwell(Swell swell)
            : base(swell)
        {
            FillMode = FillMode.Fit;

            Content.Add(bodyContainer = new Container
            {
                RelativeSizeAxes = Axes.Both,
                Depth            = 1,
                Children         = new Drawable[]
                {
                    expandingRing = new CircularContainer
                    {
                        Name             = "Expanding ring",
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        Alpha            = 0,
                        RelativeSizeAxes = Axes.Both,
                        Blending         = BlendingParameters.Additive,
                        Masking          = true,
                        Children         = new[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Alpha            = inner_ring_alpha,
                            }
                        }
                    },
                    targetRing = new CircularContainer
                    {
                        Name             = "Target ring (thick border)",
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both,
                        Masking          = true,
                        BorderThickness  = target_ring_thick_border,
                        Blending         = BlendingParameters.Additive,
                        Children         = new Drawable[]
                        {
                            new Box
                            {
                                RelativeSizeAxes = Axes.Both,
                                Alpha            = 0,
                                AlwaysPresent    = true
                            },
                            new CircularContainer
                            {
                                Name             = "Target ring (thin border)",
                                Anchor           = Anchor.Centre,
                                Origin           = Anchor.Centre,
                                RelativeSizeAxes = Axes.Both,
                                Masking          = true,
                                BorderThickness  = target_ring_thin_border,
                                BorderColour     = Color4.White,
                                Children         = new[]
                                {
                                    new Box
                                    {
                                        RelativeSizeAxes = Axes.Both,
                                        Alpha            = 0,
                                        AlwaysPresent    = true
                                    }
                                }
                            }
                        }
                    }
                }
            });

            MainPiece.Add(symbol = new SwellSymbolPiece());

            foreach (var tick in HitObject.NestedHitObjects.OfType <SwellTick>())
            {
                var vis = new DrawableSwellTick(tick);

                ticks.Add(vis);
                AddInternal(vis);
                AddNested(vis);
            }
        }