Пример #1
0
        private void load()
        {
            var sampleMappings = new DrumSampleMapping(controlPoints);

            Children = new Drawable[]
            {
                new TaikoHalfDrum(false, sampleMappings)
                {
                    Name                 = "Left Half",
                    Anchor               = Anchor.Centre,
                    Origin               = Anchor.CentreRight,
                    RelativeSizeAxes     = Axes.Both,
                    RelativePositionAxes = Axes.X,
                    X            = -middle_split / 2,
                    RimAction    = TaikoAction.LeftRim,
                    CentreAction = TaikoAction.LeftCentre
                },
                new TaikoHalfDrum(true, sampleMappings)
                {
                    Name                 = "Right Half",
                    Anchor               = Anchor.Centre,
                    Origin               = Anchor.CentreLeft,
                    RelativeSizeAxes     = Axes.Both,
                    RelativePositionAxes = Axes.X,
                    X            = middle_split / 2,
                    RimAction    = TaikoAction.RightRim,
                    CentreAction = TaikoAction.RightCentre
                }
            };

            AddRangeInternal(sampleMappings.Sounds);
        }
Пример #2
0
        public InputDrum(ControlPointInfo controlPoints)
        {
            sampleMapping = new DrumSampleMapping(controlPoints);

            RelativeSizeAxes = Axes.Both;
            FillMode         = FillMode.Fit;
        }
Пример #3
0
            public TaikoHalfDrum(bool flipped, DrumSampleMapping sampleMappings)
            {
                this.sampleMappings = sampleMappings;

                Masking = true;

                Children = new Drawable[]
                {
                    rim = new Sprite
                    {
                        Anchor           = flipped ? Anchor.CentreLeft : Anchor.CentreRight,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both
                    },
                    rimHit = new Sprite
                    {
                        Anchor           = flipped ? Anchor.CentreLeft : Anchor.CentreRight,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both,
                        Alpha            = 0,
                        Blending         = BlendingMode.Additive,
                    },
                    centre = new Sprite
                    {
                        Anchor           = flipped ? Anchor.CentreLeft : Anchor.CentreRight,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both,
                        Size             = new Vector2(0.7f)
                    },
                    centreHit = new Sprite
                    {
                        Anchor           = flipped ? Anchor.CentreLeft : Anchor.CentreRight,
                        Origin           = Anchor.Centre,
                        RelativeSizeAxes = Axes.Both,
                        Size             = new Vector2(0.7f),
                        Alpha            = 0,
                        Blending         = BlendingMode.Additive
                    }
                };
            }