Skip to content

Commit

Permalink
Rename all field relating to Ex to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
LumpBloom7 committed Sep 3, 2023
1 parent 224b32e commit c9098d5
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class SentakkiModRelax : Mod, IApplicableAfterBeatmapConversion
public void ApplyToBeatmap(IBeatmap beatmap)
{
foreach (SentakkiHitObject ho in beatmap.HitObjects)
ho.ExState = true;
ho.Ex = true;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
if (result == HitResult.None)
return;

if (HitObject.ExState && result.IsHit())
if (HitObject.Ex && result.IsHit())
result = Result.Judgement.MaxResult;

ApplyResult(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ protected override void LoadAsyncComplete()
AnimationDuration.BindValueChanged(_ => queueTransformReset(), true);
}

public Bindable<bool> ExModifierBindable = new Bindable<bool>();
public Bindable<bool> ExBindable = new Bindable<bool>();

protected override void OnApply()
{
base.OnApply();
AccentColour.BindTo(HitObject.ColourBindable);
ExModifierBindable.BindTo(HitObject.ExStateBindable);
ExBindable.BindTo(HitObject.ExBindable);
}

protected void ApplyResult(HitResult result)
Expand All @@ -67,7 +67,7 @@ protected override void OnFree()
{
base.OnFree();
AccentColour.UnbindFrom(HitObject.ColourBindable);
ExModifierBindable.UnbindFrom(HitObject.ExStateBindable);
ExBindable.UnbindFrom(HitObject.ExBindable);
}

protected override void Update()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
if (result == HitResult.None)
return;

if (HitObject.ExState && result.IsHit())
if (HitObject.Ex && result.IsHit())
result = Result.Judgement.MaxResult;

ApplyResult(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
if (timeOffset < 0 && result != Result.Judgement.MaxResult)
return;

if (ExModifierBindable.Value && result.IsHit())
if (ExBindable.Value && result.IsHit())
result = Result.Judgement.MaxResult;

ApplyResult(result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial class ShadowPiece : Container
{
private CircularContainer glowContainer;

private Bindable<bool> ExNoteBindable = new Bindable<bool>(true);
private Bindable<bool> ExBindable = new Bindable<bool>(true);
private Bindable<Color4> AccentColour = new Bindable<Color4>();

private static readonly EdgeEffectParameters shadow_parameters = new EdgeEffectParameters
Expand Down Expand Up @@ -43,16 +43,16 @@ public ShadowPiece()
private void load(DrawableHitObject hitObject)
{
// Bind exnote
ExNoteBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExModifierBindable);
ExBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExBindable);
AccentColour.BindTo(hitObject.AccentColour);

AccentColour.BindValueChanged(_ => updateGlow());
ExNoteBindable.BindValueChanged(_ => updateGlow(), true);
ExBindable.BindValueChanged(_ => updateGlow(), true);
}

private void updateGlow()
{
if (!ExNoteBindable.Value)
if (!ExBindable.Value)
{
glowContainer.EdgeEffect = shadow_parameters;
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public partial class StarPiece : CompositeDrawable
{
private Sprite glowTexture = null!;

private Bindable<bool> ExNoteBindable = new Bindable<bool>();
private Bindable<bool> ExBindable = new Bindable<bool>();

public StarPiece()
{
Expand Down Expand Up @@ -44,8 +44,8 @@ private void load(TextureStore textures, DrawableHitObject? hitObject)
return;

// Bind exnote
ExNoteBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExModifierBindable);
ExNoteBindable.BindValueChanged(v => glowTexture.Colour = v.NewValue ? Color4.White : Color4.Black, true);
ExBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExBindable);
ExBindable.BindValueChanged(v => glowTexture.Colour = v.NewValue ? Color4.White : Color4.Black, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace osu.Game.Rulesets.Sentakki.Objects.Drawables.Pieces.Touches
{
public partial class TouchGlowPiece : CompositeDrawable
{
private Bindable<bool> ExNoteBindable = new Bindable<bool>();
private Bindable<bool> ExBindable = new Bindable<bool>();

public TouchGlowPiece()
{
Expand Down Expand Up @@ -42,8 +42,8 @@ private void load(TextureStore textures, DrawableHitObject? hitObject)
return;

// Bind exnote
ExNoteBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExModifierBindable);
ExNoteBindable.BindValueChanged(v => Colour = v.NewValue ? Color4.White : Color4.Black, true);
ExBindable.BindTo(((DrawableSentakkiHitObject)hitObject).ExBindable);
ExBindable.BindValueChanged(v => Colour = v.NewValue ? Color4.White : Color4.Black, true);
}
}
}
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Sentakki/Objects/Hold.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
Lane = Lane,
Samples = nodeSamples.Any() ? nodeSamples.First() : new List<HitSampleInfo>(),
ColourBindable = ColourBindable.GetBoundCopy(),
ExState = ExState
Ex = Ex
});
}

Expand Down
8 changes: 4 additions & 4 deletions osu.Game.Rulesets.Sentakki/Objects/SentakkiHitObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public Color4 NoteColour
set => ColourBindable.Value = value;
}

public Bindable<bool> ExStateBindable = new Bindable<bool>();
public Bindable<bool> ExBindable = new Bindable<bool>();

public bool ExState
public bool Ex
{
get => ExStateBindable.Value;
set => ExStateBindable.Value = value;
get => ExBindable.Value;
set => ExBindable.Value = value;
}

[JsonIgnore]
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Sentakki/Objects/Slide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected override void CreateNestedHitObjects(CancellationToken cancellationTok
StartTime = StartTime,
Samples = NodeSamples.Any() ? NodeSamples.First() : new List<HitSampleInfo>(),
Break = Break,
ExState = ExState
Ex = Ex
});
createSlideBodies();
}
Expand Down

0 comments on commit c9098d5

Please sign in to comment.