mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 01:02:55 +08:00
Merge pull request #20993 from peppy/improve-argon-bananas
Improve osu!catch "argon" skin bananas
This commit is contained in:
commit
09b676ec20
@ -52,7 +52,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1021.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1021.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.1027.0" />
|
<PackageReference Include="ppy.osu.Framework.Android" Version="2022.1028.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Transitive Dependencies">
|
<ItemGroup Label="Transitive Dependencies">
|
||||||
<!-- Realm needs to be directly referenced in all Xamarin projects, as it will not pull in its transitive dependencies otherwise. -->
|
<!-- Realm needs to be directly referenced in all Xamarin projects, as it will not pull in its transitive dependencies otherwise. -->
|
||||||
|
@ -28,6 +28,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
|||||||
|
|
||||||
public float DisplayRotation => Rotation;
|
public float DisplayRotation => Rotation;
|
||||||
|
|
||||||
|
public double DisplayStartTime => HitObject.StartTime;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether this hit object should stay on the catcher plate when the object is caught by the catcher.
|
/// Whether this hit object should stay on the catcher plate when the object is caught by the catcher.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -18,6 +18,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
|||||||
{
|
{
|
||||||
public new PalpableCatchHitObject HitObject => (PalpableCatchHitObject)base.HitObject;
|
public new PalpableCatchHitObject HitObject => (PalpableCatchHitObject)base.HitObject;
|
||||||
|
|
||||||
|
public double DisplayStartTime => LifetimeStart;
|
||||||
|
|
||||||
Bindable<Color4> IHasCatchObjectState.AccentColour => AccentColour;
|
Bindable<Color4> IHasCatchObjectState.AccentColour => AccentColour;
|
||||||
|
|
||||||
public Bindable<bool> HyperDash { get; } = new Bindable<bool>();
|
public Bindable<bool> HyperDash { get; } = new Bindable<bool>();
|
||||||
|
@ -16,6 +16,8 @@ namespace osu.Game.Rulesets.Catch.Objects.Drawables
|
|||||||
{
|
{
|
||||||
PalpableCatchHitObject HitObject { get; }
|
PalpableCatchHitObject HitObject { get; }
|
||||||
|
|
||||||
|
double DisplayStartTime { get; }
|
||||||
|
|
||||||
Bindable<Color4> AccentColour { get; }
|
Bindable<Color4> AccentColour { get; }
|
||||||
|
|
||||||
Bindable<bool> HyperDash { get; }
|
Bindable<bool> HyperDash { get; }
|
||||||
|
@ -5,9 +5,11 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Colour;
|
using osu.Framework.Graphics.Colour;
|
||||||
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Effects;
|
using osu.Framework.Graphics.Effects;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Framework.Utils;
|
||||||
|
using osu.Game.Rulesets.Catch.Objects;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -15,44 +17,55 @@ namespace osu.Game.Rulesets.Catch.Skinning.Argon
|
|||||||
{
|
{
|
||||||
internal class ArgonBananaPiece : ArgonFruitPiece
|
internal class ArgonBananaPiece : ArgonFruitPiece
|
||||||
{
|
{
|
||||||
|
private Container stabilisedPieceContainer = null!;
|
||||||
|
|
||||||
|
private Drawable fadeContent = null!;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
AddInternal(new UprightAspectMaintainingContainer
|
AddInternal(fadeContent = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Circle
|
stabilisedPieceContainer = new Container
|
||||||
{
|
{
|
||||||
Colour = Color4.White.Opacity(0.4f),
|
RelativeSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Blending = BlendingParameters.Additive,
|
Children = new Drawable[]
|
||||||
Size = new Vector2(8),
|
{
|
||||||
Scale = new Vector2(30, 1),
|
new Circle
|
||||||
},
|
{
|
||||||
new Box
|
Colour = Color4.White.Opacity(0.4f),
|
||||||
{
|
Anchor = Anchor.Centre,
|
||||||
Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0), Color4.White),
|
Origin = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
Blending = BlendingParameters.Additive,
|
||||||
Blending = BlendingParameters.Additive,
|
Size = new Vector2(8),
|
||||||
Anchor = Anchor.Centre,
|
Scale = new Vector2(25, 1),
|
||||||
Origin = Anchor.CentreRight,
|
},
|
||||||
Width = 1.6f,
|
new Box
|
||||||
Height = 2,
|
{
|
||||||
},
|
Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0), Color4.White.Opacity(0.8f)),
|
||||||
new Box
|
RelativeSizeAxes = Axes.X,
|
||||||
{
|
Blending = BlendingParameters.Additive,
|
||||||
Colour = ColourInfo.GradientHorizontal(Color4.White, Color4.White.Opacity(0)),
|
Anchor = Anchor.Centre,
|
||||||
RelativeSizeAxes = Axes.X,
|
Origin = Anchor.CentreRight,
|
||||||
Blending = BlendingParameters.Additive,
|
Width = 1.6f,
|
||||||
Anchor = Anchor.Centre,
|
Height = 2,
|
||||||
Origin = Anchor.CentreLeft,
|
},
|
||||||
Width = 1.6f,
|
new Circle
|
||||||
Height = 2,
|
{
|
||||||
|
Colour = ColourInfo.GradientHorizontal(Color4.White.Opacity(0.8f), Color4.White.Opacity(0)),
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Blending = BlendingParameters.Additive,
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Width = 1.6f,
|
||||||
|
Height = 2,
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
new Circle
|
new Circle
|
||||||
{
|
{
|
||||||
@ -78,5 +91,32 @@ namespace osu.Game.Rulesets.Catch.Skinning.Argon
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Update()
|
||||||
|
{
|
||||||
|
base.Update();
|
||||||
|
|
||||||
|
const float parent_scale_application = 0.4f;
|
||||||
|
|
||||||
|
// relative to time on screen
|
||||||
|
const float lens_flare_start = 0.3f;
|
||||||
|
const float lens_flare_end = 0.8f;
|
||||||
|
|
||||||
|
// Undo some of the parent scale being applied to make the lens flare feel a bit better..
|
||||||
|
float scale = parent_scale_application + (1 - parent_scale_application) * (1 / (ObjectState.DisplaySize.X / (CatchHitObject.OBJECT_RADIUS * 2)));
|
||||||
|
|
||||||
|
stabilisedPieceContainer.Rotation = -ObjectState.DisplayRotation;
|
||||||
|
stabilisedPieceContainer.Scale = new Vector2(scale, 1);
|
||||||
|
|
||||||
|
double duration = ObjectState.HitObject.StartTime - ObjectState.DisplayStartTime;
|
||||||
|
|
||||||
|
fadeContent.Alpha = MathHelper.Clamp(
|
||||||
|
Interpolation.ValueAt(
|
||||||
|
Time.Current, 1f, 0f,
|
||||||
|
ObjectState.DisplayStartTime + duration * lens_flare_start,
|
||||||
|
ObjectState.DisplayStartTime + duration * lens_flare_end,
|
||||||
|
Easing.OutQuint
|
||||||
|
), 0, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
// 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 osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Catch.Skinning.Default
|
namespace osu.Game.Rulesets.Catch.Skinning.Default
|
||||||
{
|
{
|
||||||
public class BananaPiece : CatchHitObjectPiece
|
public class BananaPiece : CatchHitObjectPiece
|
||||||
{
|
{
|
||||||
protected override BorderPiece BorderPiece { get; }
|
protected override Drawable BorderPiece { get; }
|
||||||
|
|
||||||
public BananaPiece()
|
public BananaPiece()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new[]
|
||||||
{
|
{
|
||||||
new BananaPulpFormation
|
new BananaPulpFormation
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
/// A part of this piece that will be faded out while falling in the playfield.
|
/// A part of this piece that will be faded out while falling in the playfield.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
protected virtual BorderPiece BorderPiece => null;
|
protected virtual Drawable BorderPiece => null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A part of this piece that will be only visible when <see cref="HyperDash"/> is true.
|
/// A part of this piece that will be only visible when <see cref="HyperDash"/> is true.
|
||||||
|
@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Catch.Skinning.Default
|
|||||||
|
|
||||||
public readonly Bindable<FruitVisualRepresentation> VisualRepresentation = new Bindable<FruitVisualRepresentation>();
|
public readonly Bindable<FruitVisualRepresentation> VisualRepresentation = new Bindable<FruitVisualRepresentation>();
|
||||||
|
|
||||||
protected override BorderPiece BorderPiece { get; }
|
protected override Drawable BorderPiece { get; }
|
||||||
protected override Drawable HyperBorderPiece { get; }
|
protected override Drawable HyperBorderPiece { get; }
|
||||||
|
|
||||||
public FruitPiece()
|
public FruitPiece()
|
||||||
|
@ -79,7 +79,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
public override void ApplyTransformsAt(double time, bool propagateChildren = false)
|
public override void ApplyTransformsAt(double time, bool propagateChildren = false)
|
||||||
{
|
{
|
||||||
// For the same reasons as above w.r.t rewinding, we shouldn't propagate to children here either.
|
// For the same reasons as above w.r.t rewinding, we shouldn't propagate to children here either.
|
||||||
// ReSharper disable once RedundantArgumentDefaultValue - removing the "redundant" default value triggers BaseMethodCallWithDefaultParameter
|
|
||||||
|
// ReSharper disable once RedundantArgumentDefaultValue
|
||||||
base.ApplyTransformsAt(time, false);
|
base.ApplyTransformsAt(time, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ namespace osu.Game.Tests.Collections.IO
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Name matches the automatically chosen name from `CleanRunHeadlessGameHost` above, so we end up using the same storage location.
|
// Name matches the automatically chosen name from `CleanRunHeadlessGameHost` above, so we end up using the same storage location.
|
||||||
using (HeadlessGameHost host = new TestRunHeadlessGameHost(firstRunName, null))
|
using (HeadlessGameHost host = new TestRunHeadlessGameHost(firstRunName))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ namespace osu.Game.Tournament.Tests.NonVisual
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestCustomDirectory()
|
public void TestCustomDirectory()
|
||||||
{
|
{
|
||||||
using (HeadlessGameHost host = new TestRunHeadlessGameHost(nameof(TestCustomDirectory), null)) // don't use clean run as we are writing a config file.
|
using (HeadlessGameHost host = new TestRunHeadlessGameHost(nameof(TestCustomDirectory))) // don't use clean run as we are writing a config file.
|
||||||
{
|
{
|
||||||
string osuDesktopStorage = Path.Combine(host.UserStoragePaths.First(), nameof(TestCustomDirectory));
|
string osuDesktopStorage = Path.Combine(host.UserStoragePaths.First(), nameof(TestCustomDirectory));
|
||||||
const string custom_tournament = "custom";
|
const string custom_tournament = "custom";
|
||||||
|
@ -21,7 +21,7 @@ namespace osu.Game.Tournament.Tests.NonVisual
|
|||||||
public void CheckIPCLocation()
|
public void CheckIPCLocation()
|
||||||
{
|
{
|
||||||
// don't use clean run because files are being written before osu! launches.
|
// don't use clean run because files are being written before osu! launches.
|
||||||
using (var host = new TestRunHeadlessGameHost(nameof(CheckIPCLocation), null))
|
using (var host = new TestRunHeadlessGameHost(nameof(CheckIPCLocation)))
|
||||||
{
|
{
|
||||||
string basePath = Path.Combine(host.UserStoragePaths.First(), nameof(CheckIPCLocation));
|
string basePath = Path.Combine(host.UserStoragePaths.First(), nameof(CheckIPCLocation));
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Realm" Version="10.17.0" />
|
<PackageReference Include="Realm" Version="10.17.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2022.1027.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2022.1028.0" />
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1021.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1021.0" />
|
||||||
<PackageReference Include="Sentry" Version="3.22.0" />
|
<PackageReference Include="Sentry" Version="3.22.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
||||||
|
@ -62,7 +62,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup Label="Package References">
|
<ItemGroup Label="Package References">
|
||||||
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1021.0" />
|
<PackageReference Include="ppy.osu.Game.Resources" Version="2022.1021.0" />
|
||||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.1027.0" />
|
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.1028.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net6.0) -->
|
<!-- See https://github.com/dotnet/runtime/issues/35988 (can be removed after Xamarin uses net6.0) -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
@ -82,7 +82,7 @@
|
|||||||
<PackageReference Include="DiffPlex" Version="1.7.1" />
|
<PackageReference Include="DiffPlex" Version="1.7.1" />
|
||||||
<PackageReference Include="Humanizer" Version="2.14.1" />
|
<PackageReference Include="Humanizer" Version="2.14.1" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||||
<PackageReference Include="ppy.osu.Framework" Version="2022.1027.0" />
|
<PackageReference Include="ppy.osu.Framework" Version="2022.1028.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
<PackageReference Include="SharpCompress" Version="0.32.2" />
|
||||||
<PackageReference Include="NUnit" Version="3.13.3" />
|
<PackageReference Include="NUnit" Version="3.13.3" />
|
||||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||||
|
Loading…
Reference in New Issue
Block a user