mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Fix multiple issues with transform handling
This commit is contained in:
@ -16,15 +16,13 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
|||||||
{
|
{
|
||||||
internal partial class LegacyKiaiGlow : BeatSyncedContainer
|
internal partial class LegacyKiaiGlow : BeatSyncedContainer
|
||||||
{
|
{
|
||||||
public LegacyKiaiGlow()
|
private bool isKiaiActive;
|
||||||
{
|
|
||||||
AlwaysPresent = true;
|
|
||||||
Alpha = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(ISkinSource skin)
|
private void load(ISkinSource skin, HealthProcessor? healthProcessor)
|
||||||
{
|
{
|
||||||
|
Alpha = 0;
|
||||||
|
|
||||||
Child = new Sprite
|
Child = new Sprite
|
||||||
{
|
{
|
||||||
Texture = skin.GetTexture("taiko-glow"),
|
Texture = skin.GetTexture("taiko-glow"),
|
||||||
@ -33,14 +31,6 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
|||||||
Scale = new Vector2(0.7f),
|
Scale = new Vector2(0.7f),
|
||||||
Colour = new Colour4(255, 228, 0, 255),
|
Colour = new Colour4(255, 228, 0, 255),
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
[Resolved(CanBeNull = true)]
|
|
||||||
private HealthProcessor? healthProcessor { get; set; }
|
|
||||||
|
|
||||||
protected override void Update()
|
|
||||||
{
|
|
||||||
base.Update();
|
|
||||||
|
|
||||||
if (healthProcessor != null)
|
if (healthProcessor != null)
|
||||||
healthProcessor.NewJudgement += onNewJudgement;
|
healthProcessor.NewJudgement += onNewJudgement;
|
||||||
@ -48,16 +38,21 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
|||||||
|
|
||||||
private void onNewJudgement(JudgementResult result)
|
private void onNewJudgement(JudgementResult result)
|
||||||
{
|
{
|
||||||
if (!result.IsHit)
|
if (!result.IsHit || !isKiaiActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.ScaleTo(1.2f)
|
this.ScaleTo(1.2f).Then()
|
||||||
.Then().ScaleTo(1f, 80, Easing.OutQuad);
|
.ScaleTo(1f, 80, Easing.OutQuad);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes)
|
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, ChannelAmplitudes amplitudes)
|
||||||
{
|
{
|
||||||
if (effectPoint.KiaiMode)
|
if (effectPoint.KiaiMode == isKiaiActive)
|
||||||
|
return;
|
||||||
|
|
||||||
|
isKiaiActive = effectPoint.KiaiMode;
|
||||||
|
|
||||||
|
if (isKiaiActive)
|
||||||
this.FadeIn(180);
|
this.FadeIn(180);
|
||||||
else
|
else
|
||||||
this.FadeOut(180);
|
this.FadeOut(180);
|
||||||
|
Reference in New Issue
Block a user