mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 14:17:06 +09:00
Only do misses animations on modern skins
This commit is contained in:
@ -17,6 +17,7 @@ namespace osu.Game.Skinning
|
||||
public partial class LegacyJudgementPieceNew : CompositeDrawable, IAnimatableJudgement
|
||||
{
|
||||
private readonly HitResult result;
|
||||
private readonly decimal? version;
|
||||
|
||||
private readonly LegacyJudgementPieceOld? temporaryOldStyle;
|
||||
|
||||
@ -24,9 +25,10 @@ namespace osu.Game.Skinning
|
||||
|
||||
private readonly ParticleExplosion? particles;
|
||||
|
||||
public LegacyJudgementPieceNew(HitResult result, Func<Drawable> createMainDrawable, Texture? particleTexture)
|
||||
public LegacyJudgementPieceNew(HitResult result, decimal? version, Func<Drawable> createMainDrawable, Texture? particleTexture)
|
||||
{
|
||||
this.result = result;
|
||||
this.version = version;
|
||||
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Origin = Anchor.Centre;
|
||||
@ -54,7 +56,7 @@ namespace osu.Game.Skinning
|
||||
if (result != HitResult.Miss)
|
||||
{
|
||||
//new judgement shows old as a temporary effect
|
||||
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, createMainDrawable, 1.05f, true)
|
||||
AddInternal(temporaryOldStyle = new LegacyJudgementPieceOld(result, this.version, createMainDrawable, 1.05f, true)
|
||||
{
|
||||
Blending = BlendingParameters.Additive,
|
||||
Anchor = Anchor.Centre,
|
||||
@ -100,21 +102,6 @@ namespace osu.Game.Skinning
|
||||
|
||||
switch (result)
|
||||
{
|
||||
case HitResult.Miss:
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1, 100, Easing.In);
|
||||
|
||||
//todo: this only applies to osu! ruleset apparently.
|
||||
this.MoveTo(new Vector2(0, -5));
|
||||
this.MoveToOffset(new Vector2(0, 80), fade_out_delay + fade_out_length, Easing.In);
|
||||
|
||||
float rotation = RNG.NextSingle(-8.6f, 8.6f);
|
||||
|
||||
this.RotateTo(0);
|
||||
this.RotateTo(rotation, fade_in_length)
|
||||
.Then().RotateTo(rotation * 2, fade_out_delay + fade_out_length - fade_in_length, Easing.In);
|
||||
break;
|
||||
|
||||
default:
|
||||
mainPiece.ScaleTo(0.9f);
|
||||
mainPiece.ScaleTo(1.05f, fade_out_delay + fade_out_length);
|
||||
|
@ -17,13 +17,15 @@ 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, Func<Drawable> createMainDrawable, float finalScale = 1f, bool forceTransforms = false)
|
||||
public LegacyJudgementPieceOld(HitResult result, decimal? version, Func<Drawable> createMainDrawable, float finalScale = 1f, bool forceTransforms = false)
|
||||
{
|
||||
this.result = result;
|
||||
this.version = version;
|
||||
this.finalScale = finalScale;
|
||||
this.forceTransforms = forceTransforms;
|
||||
|
||||
@ -56,8 +58,11 @@ namespace osu.Game.Skinning
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1, 100, Easing.In);
|
||||
|
||||
this.MoveTo(new Vector2(0, -5));
|
||||
this.MoveToOffset(new Vector2(0, 80), fade_out_delay + fade_out_length, Easing.In);
|
||||
if (this.version > 1)
|
||||
{
|
||||
this.MoveTo(new Vector2(0, -5));
|
||||
this.MoveToOffset(new Vector2(0, 80), fade_out_delay + fade_out_length, Easing.In);
|
||||
}
|
||||
|
||||
float rotation = RNG.NextSingle(-8.6f, 8.6f);
|
||||
|
||||
|
@ -390,9 +390,9 @@ namespace osu.Game.Skinning
|
||||
var particle = getParticleTexture(resultComponent.Component);
|
||||
|
||||
if (particle != null)
|
||||
return new LegacyJudgementPieceNew(resultComponent.Component, createDrawable, particle);
|
||||
return new LegacyJudgementPieceNew(resultComponent.Component, this.Configuration.LegacyVersion, createDrawable, particle);
|
||||
|
||||
return new LegacyJudgementPieceOld(resultComponent.Component, createDrawable);
|
||||
return new LegacyJudgementPieceOld(resultComponent.Component, this.Configuration.LegacyVersion, createDrawable);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user