mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:43:20 +08:00
Merge pull request #22421 from EXtremeExploit/misses-animation
Add movement to legacy misses in osu ruleset
This commit is contained in:
commit
48ef25cbe5
@ -6,7 +6,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Animations;
|
using osu.Framework.Graphics.Animations;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.Utils;
|
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
@ -100,21 +99,6 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
switch (result)
|
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, -2));
|
|
||||||
this.MoveToOffset(new Vector2(0, 20), 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:
|
default:
|
||||||
mainPiece.ScaleTo(0.9f);
|
mainPiece.ScaleTo(0.9f);
|
||||||
mainPiece.ScaleTo(1.05f, fade_out_delay + fade_out_length);
|
mainPiece.ScaleTo(1.05f, fade_out_delay + fade_out_length);
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
#nullable disable
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Animations;
|
using osu.Framework.Graphics.Animations;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Utils;
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
|
using osuTK;
|
||||||
|
|
||||||
namespace osu.Game.Skinning
|
namespace osu.Game.Skinning
|
||||||
{
|
{
|
||||||
@ -20,6 +20,9 @@ namespace osu.Game.Skinning
|
|||||||
private readonly float finalScale;
|
private readonly float finalScale;
|
||||||
private readonly bool forceTransforms;
|
private readonly bool forceTransforms;
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private ISkinSource skin { get; set; } = null!;
|
||||||
|
|
||||||
public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f, bool forceTransforms = false)
|
public LegacyJudgementPieceOld(HitResult result, Func<Drawable> createMainDrawable, float finalScale = 1f, bool forceTransforms = false)
|
||||||
{
|
{
|
||||||
this.result = result;
|
this.result = result;
|
||||||
@ -55,6 +58,14 @@ namespace osu.Game.Skinning
|
|||||||
this.ScaleTo(1.6f);
|
this.ScaleTo(1.6f);
|
||||||
this.ScaleTo(1, 100, Easing.In);
|
this.ScaleTo(1, 100, Easing.In);
|
||||||
|
|
||||||
|
decimal? legacyVersion = skin.GetConfig<SkinConfiguration.LegacySetting, decimal>(SkinConfiguration.LegacySetting.Version)?.Value;
|
||||||
|
|
||||||
|
if (legacyVersion >= 2.0m)
|
||||||
|
{
|
||||||
|
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);
|
float rotation = RNG.NextSingle(-8.6f, 8.6f);
|
||||||
|
|
||||||
this.RotateTo(0);
|
this.RotateTo(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user