mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 22:33:05 +08:00
Do the thing aka fix the if
This commit is contained in:
parent
f3c92749bf
commit
758b4c8cfc
@ -23,7 +23,7 @@ namespace osu.Game.Skinning
|
||||
|
||||
private readonly ParticleExplosion? particles;
|
||||
|
||||
public LegacyJudgementPieceNew(HitResult result, decimal? version, Func<Drawable> createMainDrawable, Texture? particleTexture)
|
||||
public LegacyJudgementPieceNew(HitResult result, Func<Drawable> createMainDrawable, Texture? particleTexture)
|
||||
{
|
||||
this.result = result;
|
||||
|
||||
@ -53,7 +53,7 @@ namespace osu.Game.Skinning
|
||||
if (result != HitResult.Miss)
|
||||
{
|
||||
//new judgement shows old as a temporary effect
|
||||
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, version, createMainDrawable, 1.05f, true)
|
||||
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f, true)
|
||||
{
|
||||
Blending = BlendingParameters.Additive,
|
||||
Anchor = Anchor.Centre,
|
||||
|
@ -4,6 +4,7 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Animations;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -17,15 +18,16 @@ namespace osu.Game.Skinning
|
||||
public partial class LegacyJudgementPieceOld : CompositeDrawable, IAnimatableJudgement
|
||||
{
|
||||
private readonly HitResult result;
|
||||
private readonly decimal? version;
|
||||
|
||||
private readonly float finalScale;
|
||||
private readonly bool forceTransforms;
|
||||
|
||||
public LegacyJudgementPieceOld(HitResult result, decimal? version, Func<Drawable> createMainDrawable, float finalScale = 1f, bool forceTransforms = false)
|
||||
[Resolved]
|
||||
private ISkinSource skin { get; set; } = null!;
|
||||
|
||||
public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f, bool forceTransforms = false)
|
||||
{
|
||||
this.result = result;
|
||||
this.version = version;
|
||||
this.finalScale = finalScale;
|
||||
this.forceTransforms = forceTransforms;
|
||||
|
||||
@ -58,7 +60,9 @@ namespace osu.Game.Skinning
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1, 100, Easing.In);
|
||||
|
||||
if (version > 1)
|
||||
decimal? legacyVersion = skin.GetConfig<SkinConfiguration.LegacySetting, decimal>(SkinConfiguration.LegacySetting.Version)?.Value;
|
||||
|
||||
if (legacyVersion > 1)
|
||||
{
|
||||
this.MoveTo(new Vector2(0, -5));
|
||||
this.MoveToOffset(new Vector2(0, 80), fade_out_delay + fade_out_length, Easing.In);
|
||||
|
@ -390,9 +390,9 @@ namespace osu.Game.Skinning
|
||||
var particle = getParticleTexture(resultComponent.Component);
|
||||
|
||||
if (particle != null)
|
||||
return new LegacyJudgementPieceNew(resultComponent.Component, Configuration.LegacyVersion, createDrawable, particle);
|
||||
return new LegacyJudgementPieceNew(resultComponent.Component, createDrawable, particle);
|
||||
|
||||
return new LegacyJudgementPieceOld(resultComponent.Component, Configuration.LegacyVersion, createDrawable);
|
||||
return new LegacyJudgementPieceOld(resultComponent.Component, createDrawable);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user