示例#1
0
 public LineLifetimeEntry(BindableDouble AnimationDuration, DrawableSentakkiRuleset drawableSentakkiRuleset, double startTime)
 {
     StartTime       = startTime;
     drawableRuleset = drawableSentakkiRuleset;
     this.AnimationDuration.BindTo(AnimationDuration);
     this.AnimationDuration.BindValueChanged(refreshLifetime, true);
 }
示例#2
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);
        }
示例#3
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);
                }
            });
        }
 private void load(DrawableSentakkiRuleset drawableRuleset)
 {
     drawableSentakkiRuleset = drawableRuleset;
 }