1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +08:00

Fix InspectCode errors

This commit is contained in:
Alden Wu 2022-09-18 18:32:33 -07:00
parent 06178104c8
commit 0138663bdc
5 changed files with 15 additions and 10 deletions

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Diagnostics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Rendering;
using osuTK.Graphics;
@ -47,6 +46,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
color.A = alpha;
double timeDoingFadeOut = fadeOutTime - pointTime;
if (timeDoingFadeOut > 0)
{
float fraction = Math.Clamp((float)(1 - (timeDoingFadeOut / fade_out_duration)), 0, 1);

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Diagnostics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Rendering;
using osu.Game.Skinning;
@ -31,7 +30,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
}
}
private ISkin skin;
private readonly ISkin skin;
public LegacySmoke(ISkin skin)
{

View File

@ -28,6 +28,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
public IShader? RoundedTextureShader { get; private set; }
private float radius = 1;
protected float Radius
{
get => radius;
@ -41,8 +42,8 @@ namespace osu.Game.Rulesets.Osu.Skinning
}
}
private int rotationSeed = RNG.Next();
protected int RotationSeed
{
get => rotationSeed;
@ -57,6 +58,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
}
private Texture? texture;
protected Texture? Texture
{
get => texture;
@ -68,6 +70,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
}
private double smokeTimeStart = double.MinValue;
protected double SmokeStartTime
{
get => smokeTimeStart;
@ -82,6 +85,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
}
private double smokeTimeEnd = double.MaxValue;
protected double SmokeEndTime
{
get => smokeTimeEnd;
@ -106,6 +110,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
}
private Vector2 topLeft;
protected Vector2 TopLeft
{
get => topLeft;
@ -115,11 +120,12 @@ namespace osu.Game.Rulesets.Osu.Skinning
return;
topLeft = value;
Invalidate(Invalidation.All);
Invalidate();
}
}
private Vector2 bottomRight;
protected Vector2 BottomRight
{
get => bottomRight;
@ -140,7 +146,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
protected readonly List<SmokePoint> SmokePoints = new List<SmokePoint>();
private float totalDistance;
private Vector2? lastPosition = null;
private Vector2? lastPosition;
private const double max_duration = 60_000;
@ -216,6 +222,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
}
totalDistance %= PointInterval;
for (int i = 0; i < count; i++)
{
SmokePoints.Add(new SmokePoint
@ -335,7 +342,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
private int rotationSeed;
private Random rotationRNG = new Random();
public SmokeDrawNode(ITexturedShaderDrawable source)
protected SmokeDrawNode(ITexturedShaderDrawable source)
: base(source)
{
}

View File

@ -32,7 +32,6 @@ namespace osu.Game.Rulesets.Osu.UI
public class OsuPlayfield : Playfield
{
private readonly PlayfieldBorder playfieldBorder;
private readonly SmokeContainer smokeContainer;
private readonly ProxyContainer approachCircles;
private readonly ProxyContainer spinnerProxies;
private readonly JudgementContainer<DrawableOsuJudgement> judgementLayer;
@ -55,7 +54,7 @@ namespace osu.Game.Rulesets.Osu.UI
InternalChildren = new Drawable[]
{
playfieldBorder = new PlayfieldBorder { RelativeSizeAxes = Axes.Both },
smokeContainer = new SmokeContainer { RelativeSizeAxes = Axes.Both },
new SmokeContainer { RelativeSizeAxes = Axes.Both },
spinnerProxies = new ProxyContainer { RelativeSizeAxes = Axes.Both },
FollowPoints = new FollowPointRenderer { RelativeSizeAxes = Axes.Both },
judgementLayer = new JudgementContainer<DrawableOsuJudgement> { RelativeSizeAxes = Axes.Both },

View File

@ -19,7 +19,7 @@ namespace osu.Game.Rulesets.Osu.UI
public event Action<Vector2, double>? SmokeMoved;
public event Action<double>? SmokeEnded;
private bool isSmoking = false;
private bool isSmoking;
public override bool ReceivePositionalInputAt(Vector2 _) => true;