mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Clean Up Code
This commit is contained in:
parent
f52f8326dd
commit
9b0e1c26a3
@ -448,7 +448,6 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
return curveData.RepeatSamples[index];
|
return curveData.RepeatSamples[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs and adds a note to a pattern.
|
/// Constructs and adds a note to a pattern.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -480,7 +479,6 @@ namespace osu.Game.Rulesets.Mania.Beatmaps.Patterns.Legacy
|
|||||||
Tail = { Samples = sampleInfoListAt(endTime) }
|
Tail = { Samples = sampleInfoListAt(endTime) }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
newObject = holdNote;
|
newObject = holdNote;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
|
|
||||||
for (float d = interval; d < distance; d += interval)
|
for (float d = interval; d < distance; d += interval)
|
||||||
{
|
{
|
||||||
lastPosition = pos1 + direction * d;
|
lastPosition = pos1 + (direction * d);
|
||||||
addPosition(lastPosition.Value);
|
addPosition(lastPosition.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
colour.BottomRight.Linear.A = Parts[i].Time + colour.BottomRight.Linear.A;
|
colour.BottomRight.Linear.A = Parts[i].Time + colour.BottomRight.Linear.A;
|
||||||
|
|
||||||
Texture.DrawQuad(
|
Texture.DrawQuad(
|
||||||
new Quad(pos.X - Size.X / 2, pos.Y - Size.Y / 2, Size.X, Size.Y),
|
new Quad(pos.X - (Size.X / 2), pos.Y - (Size.Y / 2), Size.X, Size.Y),
|
||||||
colour,
|
colour,
|
||||||
null,
|
null,
|
||||||
v => Shared.VertexBuffer.Vertices[end++] = v);
|
v => Shared.VertexBuffer.Vertices[end++] = v);
|
||||||
|
@ -143,7 +143,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
StartValue = -10,
|
StartValue = -10,
|
||||||
EndValue = 10,
|
EndValue = 10,
|
||||||
StartTime = startTime,
|
StartTime = startTime,
|
||||||
EndTime = startTime + duration * 2,
|
EndTime = startTime + (duration * 2),
|
||||||
Easing = EasingTypes.InOutSine,
|
Easing = EasingTypes.InOutSine,
|
||||||
LoopCount = -1,
|
LoopCount = -1,
|
||||||
LoopDelay = duration * 2
|
LoopDelay = duration * 2
|
||||||
@ -176,7 +176,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
StartValue = new Vector2(0, -10),
|
StartValue = new Vector2(0, -10),
|
||||||
EndValue = Vector2.Zero,
|
EndValue = Vector2.Zero,
|
||||||
StartTime = startTime + duration,
|
StartTime = startTime + duration,
|
||||||
EndTime = startTime + duration * 2,
|
EndTime = startTime + (duration * 2),
|
||||||
Easing = EasingTypes.In,
|
Easing = EasingTypes.In,
|
||||||
LoopCount = -1,
|
LoopCount = -1,
|
||||||
LoopDelay = duration
|
LoopDelay = duration
|
||||||
@ -187,7 +187,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
StartValue = Vector2.One,
|
StartValue = Vector2.One,
|
||||||
EndValue = new Vector2(1, 0.9f),
|
EndValue = new Vector2(1, 0.9f),
|
||||||
StartTime = startTime + duration,
|
StartTime = startTime + duration,
|
||||||
EndTime = startTime + duration * 2,
|
EndTime = startTime + (duration * 2),
|
||||||
Easing = EasingTypes.In,
|
Easing = EasingTypes.In,
|
||||||
LoopCount = -1,
|
LoopCount = -1,
|
||||||
LoopDelay = duration
|
LoopDelay = duration
|
||||||
@ -197,8 +197,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
{
|
{
|
||||||
StartValue = 10,
|
StartValue = 10,
|
||||||
EndValue = -10,
|
EndValue = -10,
|
||||||
StartTime = startTime + duration * 2,
|
StartTime = startTime + (duration * 2),
|
||||||
EndTime = startTime + duration * 4,
|
EndTime = startTime + (duration * 4),
|
||||||
Easing = EasingTypes.InOutSine,
|
Easing = EasingTypes.InOutSine,
|
||||||
LoopCount = -1,
|
LoopCount = -1,
|
||||||
LoopDelay = duration * 2
|
LoopDelay = duration * 2
|
||||||
@ -282,10 +282,13 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public ButtonState State
|
public ButtonState State
|
||||||
{
|
{
|
||||||
get { return state; }
|
get
|
||||||
|
{
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
|
||||||
if (state == value)
|
if (state == value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -51,10 +51,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
public bool Triangles
|
public bool Triangles
|
||||||
{
|
{
|
||||||
set
|
set { colourAndTriangles.Alpha = value ? 1 : 0; }
|
||||||
{
|
|
||||||
colourAndTriangles.Alpha = value ? 1 : 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool InternalContains(Vector2 screenSpacePos) => logoContainer.Contains(screenSpacePos);
|
protected override bool InternalContains(Vector2 screenSpacePos) => logoContainer.Contains(screenSpacePos);
|
||||||
@ -62,10 +59,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
public bool Ripple
|
public bool Ripple
|
||||||
{
|
{
|
||||||
get { return rippleContainer.Alpha > 0; }
|
get { return rippleContainer.Alpha > 0; }
|
||||||
set
|
set { rippleContainer.Alpha = value ? 1 : 0; }
|
||||||
{
|
|
||||||
rippleContainer.Alpha = value ? 1 : 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Interactive = true;
|
public bool Interactive = true;
|
||||||
@ -237,7 +231,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
if (beatIndex < 0) return;
|
if (beatIndex < 0) return;
|
||||||
|
|
||||||
logoBeatContainer.ScaleTo(1 - 0.02f * amplitudeAdjust, beat_in_time, EasingTypes.Out);
|
logoBeatContainer.ScaleTo(1 - (0.02f * amplitudeAdjust), beat_in_time, EasingTypes.Out);
|
||||||
using (logoBeatContainer.BeginDelayedSequence(beat_in_time))
|
using (logoBeatContainer.BeginDelayedSequence(beat_in_time))
|
||||||
logoBeatContainer.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
logoBeatContainer.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
||||||
|
|
||||||
@ -246,7 +240,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
ripple.ScaleTo(logoAmplitudeContainer.Scale);
|
ripple.ScaleTo(logoAmplitudeContainer.Scale);
|
||||||
ripple.Alpha = 0.15f * amplitudeAdjust;
|
ripple.Alpha = 0.15f * amplitudeAdjust;
|
||||||
|
|
||||||
ripple.ScaleTo(logoAmplitudeContainer.Scale * (1 + 0.04f * amplitudeAdjust), beatLength, EasingTypes.OutQuint);
|
ripple.ScaleTo(logoAmplitudeContainer.Scale * (1 + (0.04f * amplitudeAdjust)), beatLength, EasingTypes.OutQuint);
|
||||||
ripple.FadeOut(beatLength, EasingTypes.OutQuint);
|
ripple.FadeOut(beatLength, EasingTypes.OutQuint);
|
||||||
|
|
||||||
if (effectPoint.KiaiMode && flashLayer.Alpha < 0.4f)
|
if (effectPoint.KiaiMode && flashLayer.Alpha < 0.4f)
|
||||||
|
@ -278,7 +278,6 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
if (!pauseContainer.IsPaused)
|
if (!pauseContainer.IsPaused)
|
||||||
decoupledClock.Start();
|
decoupledClock.Start();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
pauseContainer.Alpha = 0;
|
pauseContainer.Alpha = 0;
|
||||||
|
@ -46,7 +46,11 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public BeatmapInfo Beatmap
|
public BeatmapInfo Beatmap
|
||||||
{
|
{
|
||||||
get { return beatmap; }
|
get
|
||||||
|
{
|
||||||
|
return beatmap;
|
||||||
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (beatmap == value) return;
|
if (beatmap == value) return;
|
||||||
|
@ -82,7 +82,11 @@ namespace osu.Game.Screens.Tournament
|
|||||||
private ScrollState _scrollState;
|
private ScrollState _scrollState;
|
||||||
private ScrollState scrollState
|
private ScrollState scrollState
|
||||||
{
|
{
|
||||||
get { return _scrollState; }
|
get
|
||||||
|
{
|
||||||
|
return _scrollState;
|
||||||
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
if (_scrollState == value)
|
if (_scrollState == value)
|
||||||
@ -261,7 +265,7 @@ namespace osu.Game.Screens.Tournament
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
c.MoveToX(pos, 100);
|
c.MoveToX(pos, 100);
|
||||||
c.FadeTo(1.0f - Math.Abs(pos - DrawWidth / 2f) / (DrawWidth / 2.5f), 100);
|
c.FadeTo(1.0f - (Math.Abs(pos - (DrawWidth / 2f)) / (DrawWidth / 2.5f)), 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
pos += ScrollingTeam.WIDTH;
|
pos += ScrollingTeam.WIDTH;
|
||||||
@ -328,7 +332,11 @@ namespace osu.Game.Screens.Tournament
|
|||||||
private bool selected;
|
private bool selected;
|
||||||
public bool Selected
|
public bool Selected
|
||||||
{
|
{
|
||||||
get { return selected; }
|
get
|
||||||
|
{
|
||||||
|
return selected;
|
||||||
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
selected = value;
|
selected = value;
|
||||||
|
Loading…
Reference in New Issue
Block a user