示例#1
0
        private void load(DrawableSentakkiRuleset drawableRuleset, SentakkiRulesetConfigManager sentakkiRulesetConfigManager)
        {
            drawableSentakkiRuleset = drawableRuleset;
            sentakkiRulesetConfig   = sentakkiRulesetConfigManager;

            RegisterPool <Objects.Touch, DrawableTouch>(8);
        }
示例#2
0
        private void load(SentakkiRulesetConfigManager sentakkiConfigs)
        {
            sentakkiConfigs?.BindWith(SentakkiRulesetSettings.DetailedJudgements, detailedJudgements);

            Anchor = Anchor.Centre;
            Origin = Anchor.Centre;
            AddInternal(
                judgementBody = new Container
            {
                Anchor   = Anchor.Centre,
                Origin   = Anchor.Centre,
                Scale    = new Vector2(0.9f),
                Children = new Drawable[] {
                    timingPiece = new OsuSpriteText {
                        Y            = -15,
                        Origin       = Anchor.Centre,
                        Font         = OsuFont.Torus.With(size: 20, weight: FontWeight.Bold),
                        Shadow       = true,
                        ShadowColour = Color4.Black
                    },
                    judgementPiece = new SentakkiJudgementPiece(result)
                }
            }
                );
        }
示例#3
0
        private void load(SentakkiRulesetConfigManager settings, OsuColour colours, DrawableSentakkiRuleset ruleset, IAPIProvider api, SkinManager skinManager)
        {
            settings?.BindWith(SentakkiRulesetSettings.RingOpacity, RingOpacity);
            RingOpacity.BindValueChanged(opacity => Alpha = opacity.NewValue);

            settings?.BindWith(SentakkiRulesetSettings.ShowNoteStartIndicators, NoteStartIndicators);
            NoteStartIndicators.BindValueChanged(opacity => spawnIndicator.FadeTo(Convert.ToSingle(opacity.NewValue), 200));

            user = api.LocalUser.GetBoundCopy();
            skin = skinManager.CurrentSkin.GetBoundCopy();

            user.ValueChanged += _ => colorOption.TriggerChange();
            skin.BindValueChanged(_ => colorOption.TriggerChange(), true);

            settings?.BindWith(SentakkiRulesetSettings.RingColor, colorOption);
            colorOption.BindValueChanged(option =>
            {
                if (option.NewValue == ColorOption.Default)
                {
                    this.FadeColour(Color4.White, 200);
                }
                else if (option.NewValue == ColorOption.Difficulty)
                {
                    this.FadeColour(colours.ForDifficultyRating(ruleset?.Beatmap.BeatmapInfo.DifficultyRating ?? DifficultyRating.Normal, true), 200);
                }
                else if (option.NewValue == ColorOption.Skin)
                {
                    this.FadeColour(skin.Value.GetConfig <GlobalSkinColours, Color4>(GlobalSkinColours.MenuGlow)?.Value ?? Color4.White, 200);
                }
            });

            settings?.BindWith(SentakkiRulesetSettings.KiaiEffects, kiaiEffect);
        }
 public SentakkiHitObjectLifetimeEntry(HitObject hitObject, SentakkiRulesetConfigManager configManager, DrawableSentakkiRuleset senRuleset) : base(hitObject)
 {
     sentakkiConfigs = configManager;
     drawableRuleset = senRuleset;
     bindAnimationDuration();
     AnimationDurationBindable.BindValueChanged(x => LifetimeStart = HitObject.StartTime - InitialLifetimeOffset, true);
 }
示例#5
0
        private void load(SentakkiRulesetConfigManager sentakkiConfigs)
        {
            sentakkiConfigs?.BindWith(SentakkiRulesetSettings.TouchAnimationDuration, AnimationDuration);

            Size   = new Vector2(105);
            Origin = Anchor.Centre;
            Anchor = Anchor.Centre;
            Alpha  = 0;
            AddRangeInternal(new Drawable[] {
                touchBody = new TouchBody(),
                explosion = new HitExplosion()
            });

            trackedKeys.BindValueChanged(x =>
            {
                if (AllJudged)
                {
                    return;
                }

                UpdateResult(true);
            });

            AccentColour.BindValueChanged(c =>
            {
                explosion.Colour = c.NewValue;
            }, true);
        }
示例#6
0
        private void load(SentakkiRulesetConfigManager settings)
        {
            settings?.BindWith(SentakkiRulesetSettings.RingOpacity, RingOpacity);
            RingOpacity.BindValueChanged(opacity => Alpha = opacity.NewValue);

            settings?.BindWith(SentakkiRulesetSettings.ShowNoteStartIndicators, NoteStartIndicators);
            NoteStartIndicators.BindValueChanged(opacity => spawnIndicator.FadeTo(Convert.ToSingle(opacity.NewValue), 200));

            settings?.BindWith(SentakkiRulesetSettings.KiaiEffects, kiaiEffect);
        }
示例#7
0
        private void load(SentakkiRulesetConfigManager sentakkiConfigs)
        {
            sentakkiConfigs?.BindWith(SentakkiRulesetSettings.AnimationDuration, animationDuration);

            foreach (var type in Enum.GetValues(typeof(LineType)).OfType <LineType>())
            {
                linePools.Add(type, new DrawableLinePool(type));
            }

            AddRangeInternal(linePools.Values);
        }
示例#8
0
        private void load(SentakkiRulesetConfigManager sentakkiConfigs, TextureStore textures)
        {
            sentakkiConfigs?.BindWith(SentakkiRulesetSettings.AnimationDuration, animationDuration);
            animationDuration.BindValueChanged(_ => resetAnimation());

            AddInternal(new Sprite()
            {
                RelativeSizeAxes = Axes.Both,
                FillMode         = FillMode.Fit,
                Anchor           = Anchor.TopCentre,
                Origin           = Anchor.TopCentre,
                Texture          = textures.Get(LineTexturePath())
            });
        }
示例#9
0
            private void load(SentakkiRulesetConfigManager settings, OsuColour colours, DrawableSentakkiRuleset ruleset, IAPIProvider api, SkinManager skinManager)
            {
                FillAspectRatio  = 1;
                FillMode         = FillMode.Fit;
                RelativeSizeAxes = Axes.Both;
                Size             = new Vector2(.99f);
                Anchor           = Anchor.Centre;
                Origin           = Anchor.Centre;
                Child            = visualisation = new LogoVisualisation
                {
                    RelativeSizeAxes = Axes.Both,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                };

                user = api.LocalUser.GetBoundCopy();
                skin = skinManager.CurrentSkin.GetBoundCopy();
                user.ValueChanged += _ => colorOption.TriggerChange();
                skin.BindValueChanged(_ => colorOption.TriggerChange(), true);

                settings?.BindWith(SentakkiRulesetSettings.KiaiEffects, kiaiEffect);
                kiaiEffect.TriggerChange();

                settings?.BindWith(SentakkiRulesetSettings.RingColor, colorOption);
                // I know that these colors should directly affect AccentColour, but the outcome is not desireable with certain colors
                // Instead, I'll just change the main drawable color to retain the better looking transparency with all colors.
                // AccentColour is being forced to be White to counter the LogoVisualisation's bindables
                // Definitely needs cleaner code to do this, perhaps another Visualisation class...
                colorOption.BindValueChanged(option =>
                {
                    if (option.NewValue == ColorOption.Default)
                    {
                        visualisation.FadeColour(Color4.White, 200);
                        visualisation.AccentColour = Color4.White.Opacity(.2f);
                    }
                    else if (option.NewValue == ColorOption.Difficulty)
                    {
                        visualisation.FadeColour(colours.ForDifficultyRating(ruleset?.Beatmap.BeatmapInfo.DifficultyRating ?? DifficultyRating.Normal, true), 200);
                        visualisation.AccentColour = Color4.White.Opacity(.2f);
                    }
                    else if (option.NewValue == ColorOption.Skin)
                    {
                        visualisation.FadeColour(skin.Value.GetConfig <GlobalSkinColours, Color4>(GlobalSkinColours.MenuGlow)?.Value ?? Color4.White, 200);
                        visualisation.AccentColour = Color4.White.Opacity(.2f);
                    }
                });
            }
示例#10
0
        private void load(DrawableSentakkiRuleset drawableRuleset, SentakkiRulesetConfigManager sentakkiRulesetConfigManager)
        {
            drawableSentakkiRuleset = drawableRuleset;
            sentakkiRulesetConfig   = sentakkiRulesetConfigManager;

            RegisterPool <Tap, DrawableTap>(8);

            RegisterPool <Hold, DrawableHold>(8);
            RegisterPool <Hold.HoldHead, DrawableHoldHead>(8);

            RegisterPool <Slide, DrawableSlide>(2);
            RegisterPool <SlideTap, DrawableSlideTap>(2);
            RegisterPool <SlideBody, DrawableSlideBody>(2);
            RegisterPool <SlideBody.SlideNode, DrawableSlideNode>(18);

            RegisterPool <ScorePaddingObject, DrawableScorePaddingObject>(20);
        }
        private void load(ShaderManager shaders, IBindable <WorkingBeatmap> beatmap, SentakkiRulesetConfigManager settings)
        {
            this.beatmap.BindTo(beatmap);
            shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);

            settings?.BindWith(SentakkiRulesetSettings.KiaiEffects, kiaiEffect);
            kiaiEffect.BindValueChanged(k =>
            {
                if (k.NewValue)
                {
                    this.FadeIn(200);
                }
                else
                {
                    this.FadeOut(500);
                }
            });
        }
示例#12
0
 private void load(SentakkiRulesetConfigManager sentakkiConfig)
 {
     Size   = Vector2.Zero;
     Origin = Anchor.Centre;
     Anchor = Anchor.Centre;
     AddRangeInternal(new Drawable[]
     {
         SlideBodies = new Container <DrawableSlideBody> {
             Anchor = Anchor.Centre,
             Origin = Anchor.Centre,
         },
         SlideTaps = new Container <DrawableSlideTap>
         {
             Anchor = Anchor.Centre,
             Origin = Anchor.Centre,
         }
     });
 }
        private void load(TextureStore textures, SentakkiRulesetConfigManager settings)
        {
            InternalChild = JudgementBody = new Container
            {
                Anchor           = Anchor.Centre,
                Origin           = Anchor.Centre,
                RelativeSizeAxes = Axes.Both,
                Child            = JudgementText = new OsuSpriteText
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Text   = Result.Type.GetDescription().ToUpperInvariant(),
                    Font   = OsuFont.Numeric.With(size: 20),
                    Colour = colours.ForHitResult(Result.Type),
                    Scale  = new Vector2(0.85f, 1),
                }
            };
            if (settings != null && settings.Get <bool>(SentakkiRulesetSettings.MaimaiJudgements))
            {
                switch (Result.Type)
                {
                case HitResult.Perfect:
                    JudgementText.Text   = "Critical";
                    JudgementText.Colour = Color4.Yellow;
                    break;

                case HitResult.Great:
                    JudgementText.Text = "Perfect";
                    break;

                case HitResult.Good:
                    JudgementText.Text = "Great";
                    break;

                case HitResult.Meh:
                    JudgementText.Text = "Good";
                    break;
                }
            }
        }
示例#14
0
        private void load(SentakkiRulesetConfigManager sentakkiConfigs)
        {
            sentakkiConfigs?.BindWith(SentakkiRulesetSettings.TouchAnimationDuration, AnimationDuration);

            Size   = new Vector2(130);
            Origin = Anchor.Centre;
            Anchor = Anchor.Centre;
            Alpha  = 0;
            AddRangeInternal(new Drawable[] {
                touchBody = new TouchBody(),
                flash     = new TouchFlashPiece {
                    RelativeSizeAxes = Axes.None,
                    Size             = new Vector2(105)
                },
                explode = new ExplodePiece {
                    RelativeSizeAxes = Axes.None,
                    Size             = new Vector2(105)
                },
            });

            trackedKeys.BindValueChanged(x =>
            {
                if (AllJudged)
                {
                    return;
                }

                UpdateResult(true);
            });

            AccentColour.BindValueChanged(c =>
            {
                flash.Colour   = c.NewValue;
                explode.Colour = c.NewValue;
            }, true);
        }
示例#15
0
        private void load(SentakkiRulesetConfigManager sentakkiConfigs)
        {
            sentakkiConfigs?.BindWith(SentakkiRulesetSettings.TouchAnimationDuration, AnimationDuration);
            Colour = Color4.SlateGray;
            Anchor = Anchor.Centre;
            Origin = Anchor.Centre;
            Scale  = new Vector2(0f);
            Alpha  = 0;
            AddRangeInternal(new Drawable[] {
                touchHoldBody = new TouchHoldBody(),
            });

            isHitting.BindValueChanged(b =>
            {
                if (b.NewValue)
                {
                    beginHold();
                }
                else
                {
                    endHold();
                }
            });
        }
示例#16
0
        private void load(SentakkiRulesetConfigManager sentakkiConfigs)
        {
            sentakkiConfigs?.BindWith(SentakkiRulesetSettings.TouchAnimationDuration, AnimationDuration);
            Colour = Color4.SlateGray;
            Anchor = Anchor.Centre;
            Origin = Anchor.Centre;
            Scale = new Vector2(0f);
            Alpha = 0;
            AddRangeInternal(new Drawable[] {
                touchHoldBody = new TouchHoldBody(),
                holdSample = new PausableSkinnableSound
                {
                    Volume = { Value = 0 },
                    Looping = true,
                    Frequency = { Value = 1 }
                }
            });

            isHitting.BindValueChanged(b =>
            {
                if (b.NewValue) beginHold();
                else endHold();
            });
        }
示例#17
0
 private void load(OsuConfigManager osuConfig, SentakkiRulesetConfigManager sentakkiConfig)
 {
     osuConfig.BindWith(OsuSetting.PositionalHitSounds, userPositionalHitSounds);
     sentakkiConfig?.BindWith(SentakkiRulesetSettings.BreakSounds, breakEnabled);
 }
示例#18
0
        private void load(ShaderManager shaders, IBindable <WorkingBeatmap> beatmap, SkinManager skinManager, SentakkiRulesetConfigManager settings, OsuColour colours, DrawableSentakkiRuleset ruleset)
        {
            this.beatmap.BindTo(beatmap);
            shader = shaders.Load(VertexShaderDescriptor.TEXTURE_2, FragmentShaderDescriptor.TEXTURE_ROUNDED);

            skin = skinManager.CurrentSkin.GetBoundCopy();
            skin.BindValueChanged(_ => colorOption.TriggerChange());

            settings?.BindWith(SentakkiRulesetSettings.KiaiEffects, kiaiEffect);
            kiaiEffect.BindValueChanged(k =>
            {
                if (k.NewValue)
                {
                    this.FadeIn(200);
                }
                else
                {
                    this.FadeOut(500);
                }
            });

            settings?.BindWith(SentakkiRulesetSettings.RingColor, colorOption);
            colorOption.BindValueChanged(c =>
            {
                AccentColour = Color4.White.Opacity(0.2f);

                if (c.NewValue == ColorOption.Default)
                {
                    this.FadeColour(Color4.White, 200);
                }
                else if (c.NewValue == ColorOption.Difficulty)
                {
                    this.FadeColour(colours.ForDifficultyRating(ruleset?.Beatmap.BeatmapInfo.DifficultyRating ?? DifficultyRating.Normal, true), 200);
                }
                else if (c.NewValue == ColorOption.Skin)
                {
                    this.FadeColour(skin.Value.GetConfig <GlobalSkinColours, Color4>(GlobalSkinColours.MenuGlow)?.Value ?? Color4.White, 200);
                }
            });
        }
示例#19
0
 private void load(SentakkiRulesetConfigManager settings)
 {
     settings?.BindWith(SentakkiRulesetSettings.AnimationDuration, animationDuration);
     HitObjectLine.Child.Colour = HitObject.NoteColor;
 }
示例#20
0
 private void load(SentakkiRulesetConfigManager sentakkiConfig)
 {
     sentakkiConfig?.BindWith(SentakkiRulesetSettings.AnimationDuration, AnimationDuration);
 }