1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 16:02:58 +08:00

Review Changes

This commit is contained in:
John Neijzen 2017-06-07 22:00:14 +08:00
parent f9c466eee9
commit aa3a231763
7 changed files with 21 additions and 33 deletions

View File

@ -136,7 +136,7 @@ namespace osu.Game.Graphics.Cursor
for (float d = interval; d < distance; d += interval)
{
lastPosition = pos1 + (direction * d);
lastPosition = pos1 + direction * d;
addPosition(lastPosition.Value);
}
}
@ -213,7 +213,7 @@ namespace osu.Game.Graphics.Cursor
colour.BottomRight.Linear.A = Parts[i].Time + colour.BottomRight.Linear.A;
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,
null,
v => Shared.VertexBuffer.Vertices[end++] = v);

View File

@ -122,7 +122,7 @@ namespace osu.Game.Overlays
{
Top = padding * 2,
Bottom = padding * 2,
Left = ChatLine.LEFT_PADDING + (padding * 2),
Left = ChatLine.LEFT_PADDING + padding * 2,
Right = padding * 2,
},
Children = new Drawable[]
@ -202,7 +202,7 @@ namespace osu.Game.Overlays
{
Trace.Assert(state.Mouse.PositionMouseDown != null);
chatHeight.Value = startDragChatHeight - ((state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y);
chatHeight.Value = startDragChatHeight - (state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y;
return base.OnDrag(state);
}

View File

@ -143,7 +143,7 @@ namespace osu.Game.Screens.Menu
StartValue = -10,
EndValue = 10,
StartTime = startTime,
EndTime = startTime + (duration * 2),
EndTime = startTime + duration * 2,
Easing = EasingTypes.InOutSine,
LoopCount = -1,
LoopDelay = duration * 2
@ -176,7 +176,7 @@ namespace osu.Game.Screens.Menu
StartValue = new Vector2(0, -10),
EndValue = Vector2.Zero,
StartTime = startTime + duration,
EndTime = startTime + (duration * 2),
EndTime = startTime + duration * 2,
Easing = EasingTypes.In,
LoopCount = -1,
LoopDelay = duration
@ -187,7 +187,7 @@ namespace osu.Game.Screens.Menu
StartValue = Vector2.One,
EndValue = new Vector2(1, 0.9f),
StartTime = startTime + duration,
EndTime = startTime + (duration * 2),
EndTime = startTime + duration * 2,
Easing = EasingTypes.In,
LoopCount = -1,
LoopDelay = duration
@ -197,8 +197,8 @@ namespace osu.Game.Screens.Menu
{
StartValue = 10,
EndValue = -10,
StartTime = startTime + (duration * 2),
EndTime = startTime + (duration * 4),
StartTime = startTime + duration * 2,
EndTime = startTime + duration * 4,
Easing = EasingTypes.InOutSine,
LoopCount = -1,
LoopDelay = duration * 2
@ -282,10 +282,7 @@ namespace osu.Game.Screens.Menu
public ButtonState State
{
get
{
return state;
}
get{ return state; }
set
{

View File

@ -231,7 +231,7 @@ namespace osu.Game.Screens.Menu
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))
logoBeatContainer.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
@ -240,7 +240,7 @@ namespace osu.Game.Screens.Menu
ripple.ScaleTo(logoAmplitudeContainer.Scale);
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);
if (effectPoint.KiaiMode && flashLayer.Alpha < 0.4f)

View File

@ -311,7 +311,7 @@ namespace osu.Game.Screens.Select
foreach (BeatmapPanel panel in group.BeatmapPanels)
{
if (panel == selectedPanel)
selectedY = currentY + (panel.DrawHeight / 2) - (DrawHeight / 2);
selectedY = currentY + panel.DrawHeight / 2 - DrawHeight / 2;
panel.MoveToX(-50, 500, EasingTypes.OutExpo);
@ -477,7 +477,7 @@ namespace osu.Game.Screens.Select
{
// The radius of the circle the carousel moves on.
const float circle_radius = 3;
double discriminant = Math.Max(0, (circle_radius * circle_radius) - (dist * dist));
double discriminant = Math.Max(0, circle_radius * circle_radius - dist * dist);
float x = (circle_radius - (float)Math.Sqrt(discriminant)) * halfHeight;
return 125 + x;
@ -493,8 +493,8 @@ namespace osu.Game.Screens.Select
{
var height = p.IsPresent ? p.DrawHeight : 0;
float panelDrawY = (p.Position.Y - Current) + (height / 2);
float dist = Math.Abs(1f - (panelDrawY / halfHeight));
float panelDrawY = p.Position.Y - Current + height / 2;
float dist = Math.Abs(1f - panelDrawY / halfHeight);
// Setting the origin position serves as an additive position on top of potential
// local transformation we may want to apply (e.g. when a panel gets selected, we
@ -504,7 +504,7 @@ namespace osu.Game.Screens.Select
// We are applying a multiplicative alpha (which is internally done by nesting an
// additional container and setting that container's alpha) such that we can
// layer transformations on top, with a similar reasoning to the previous comment.
p.SetMultiplicativeAlpha(MathHelper.Clamp(1.75f - (1.5f * dist), 0, 1));
p.SetMultiplicativeAlpha(MathHelper.Clamp(1.75f - 1.5f * dist, 0, 1));
}
}
}

View File

@ -46,10 +46,7 @@ namespace osu.Game.Screens.Select
public BeatmapInfo Beatmap
{
get
{
return beatmap;
}
get { return beatmap; }
set
{

View File

@ -82,10 +82,7 @@ namespace osu.Game.Screens.Tournament
private ScrollState _scrollState;
private ScrollState scrollState
{
get
{
return _scrollState;
}
get { return _scrollState; }
set
{
@ -265,7 +262,7 @@ namespace osu.Game.Screens.Tournament
else
{
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;
@ -332,10 +329,7 @@ namespace osu.Game.Screens.Tournament
private bool selected;
public bool Selected
{
get
{
return selected;
}
get { return selected; }
set
{