mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Try different formatting style
This commit is contained in:
parent
e6916ec57b
commit
19fb03e737
@ -60,12 +60,12 @@ namespace osu.Desktop.VisualTests.Tests
|
|||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
|
||||||
// Move box along a square trajectory
|
// Move box along a square trajectory
|
||||||
container
|
container.Loop(c => c
|
||||||
.MoveTo(new Vector2(0, 100), duration)
|
.MoveTo(new Vector2(0, 100), duration).Then()
|
||||||
.Then().MoveTo(new Vector2(100, 100), duration)
|
.MoveTo(new Vector2(100, 100), duration).Then()
|
||||||
.Then().MoveTo(new Vector2(100, 0), duration)
|
.MoveTo(new Vector2(100, 0), duration).Then()
|
||||||
.Then().MoveTo(Vector2.Zero, duration)
|
.MoveTo(Vector2.Zero, duration)
|
||||||
.Loop();
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class MyContextMenuContainer : Container, IHasContextMenu
|
private class MyContextMenuContainer : Container, IHasContextMenu
|
||||||
|
@ -129,13 +129,22 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
ApproachCircle.FadeOut(50);
|
ApproachCircle.FadeOut(50);
|
||||||
|
|
||||||
const double flash_in = 40;
|
const double flash_in = 40;
|
||||||
flash.FadeTo(0.8f, flash_in).Then().FadeOut(100);
|
flash.FadeTo(0.8f, flash_in)
|
||||||
|
.Then()
|
||||||
|
.FadeOut(100);
|
||||||
|
|
||||||
explode.FadeIn(flash_in);
|
explode.FadeIn(flash_in);
|
||||||
|
|
||||||
ring.Delay(flash_in).FadeOut();
|
using (BeginDelayedSequence(flash_in, true))
|
||||||
circle.Delay(flash_in).FadeOut();
|
{
|
||||||
number.Delay(flash_in).FadeOut();
|
//after the flash, we can hide some elements that were behind it
|
||||||
this.Delay(flash_in).FadeOut(800).ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad);
|
ring.FadeOut();
|
||||||
|
circle.FadeOut();
|
||||||
|
number.FadeOut();
|
||||||
|
|
||||||
|
this.FadeOut(800)
|
||||||
|
.ScaleTo(Scale * 1.5f, 400, EasingTypes.OutQuad);
|
||||||
|
}
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
break;
|
break;
|
||||||
|
@ -147,8 +147,10 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables
|
|||||||
|
|
||||||
var completion = (float)userHits / HitObject.RequiredHits;
|
var completion = (float)userHits / HitObject.RequiredHits;
|
||||||
|
|
||||||
expandingRing.FadeTo(expandingRing.Alpha + MathHelper.Clamp(completion / 16, 0.1f, 0.6f), 50)
|
expandingRing
|
||||||
.Then().FadeTo(completion / 8, 2000, EasingTypes.OutQuint);
|
.FadeTo(expandingRing.Alpha + MathHelper.Clamp(completion / 16, 0.1f, 0.6f), 50)
|
||||||
|
.Then()
|
||||||
|
.FadeTo(completion / 8, 2000, EasingTypes.OutQuint);
|
||||||
|
|
||||||
symbol.RotateTo((float)(completion * HitObject.Duration / 8), 4000, EasingTypes.OutQuint);
|
symbol.RotateTo((float)(completion * HitObject.Duration / 8), 4000, EasingTypes.OutQuint);
|
||||||
|
|
||||||
|
@ -166,8 +166,10 @@ namespace osu.Game.Rulesets.Taiko.Objects.Drawables.Pieces
|
|||||||
|
|
||||||
double duration = timingPoint.BeatLength * 2;
|
double duration = timingPoint.BeatLength * 2;
|
||||||
|
|
||||||
background.FadeEdgeEffectTo(1, pre_beat_transition_time, EasingTypes.OutQuint)
|
background
|
||||||
.Then().FadeEdgeEffectTo(edge_alpha_kiai, duration, EasingTypes.OutQuint);
|
.FadeEdgeEffectTo(1, pre_beat_transition_time, EasingTypes.OutQuint)
|
||||||
|
.Then()
|
||||||
|
.FadeEdgeEffectTo(edge_alpha_kiai, duration, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -246,7 +246,8 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
if (beatIndex < 0) return;
|
if (beatIndex < 0) return;
|
||||||
|
|
||||||
icon.ScaleTo(1 - 0.1f * amplitudeAdjust, beat_in_time, EasingTypes.Out)
|
icon.ScaleTo(1 - 0.1f * amplitudeAdjust, beat_in_time, EasingTypes.Out)
|
||||||
.Then().ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
.Then()
|
||||||
|
.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,9 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
using (BeginDelayedSequence(200, true))
|
using (BeginDelayedSequence(200, true))
|
||||||
{
|
{
|
||||||
disc.FadeIn(initial_duration).ScaleTo(1f, initial_duration * 2, EasingTypes.OutElastic);
|
disc.FadeIn(initial_duration)
|
||||||
|
.ScaleTo(1f, initial_duration * 2, EasingTypes.OutElastic);
|
||||||
|
|
||||||
particleContainer.FadeIn(initial_duration);
|
particleContainer.FadeIn(initial_duration);
|
||||||
outerSpin.FadeTo(0.1f, initial_duration * 2);
|
outerSpin.FadeTo(0.1f, initial_duration * 2);
|
||||||
|
|
||||||
|
@ -147,17 +147,23 @@ namespace osu.Game.Overlays.MedalSplash
|
|||||||
medalContainer.ScaleTo(0);
|
medalContainer.ScaleTo(0);
|
||||||
break;
|
break;
|
||||||
case DisplayState.Icon:
|
case DisplayState.Icon:
|
||||||
medalContainer.FadeIn(duration).ScaleTo(1, duration, EasingTypes.OutElastic);
|
medalContainer
|
||||||
|
.FadeIn(duration)
|
||||||
|
.ScaleTo(1, duration, EasingTypes.OutElastic);
|
||||||
break;
|
break;
|
||||||
case DisplayState.MedalUnlocked:
|
case DisplayState.MedalUnlocked:
|
||||||
medalContainer.FadeTo(1).ScaleTo(1);
|
medalContainer
|
||||||
|
.FadeTo(1)
|
||||||
|
.ScaleTo(1);
|
||||||
|
|
||||||
this.ScaleTo(scale_when_unlocked, duration, EasingTypes.OutExpo);
|
this.ScaleTo(scale_when_unlocked, duration, EasingTypes.OutExpo);
|
||||||
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, EasingTypes.OutExpo);
|
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 30, duration, EasingTypes.OutExpo);
|
||||||
unlocked.FadeInFromZero(duration);
|
unlocked.FadeInFromZero(duration);
|
||||||
break;
|
break;
|
||||||
case DisplayState.Full:
|
case DisplayState.Full:
|
||||||
medalContainer.FadeTo(1).ScaleTo(1);
|
medalContainer
|
||||||
|
.FadeTo(1)
|
||||||
|
.ScaleTo(1);
|
||||||
|
|
||||||
this.ScaleTo(scale_when_full, duration, EasingTypes.OutExpo);
|
this.ScaleTo(scale_when_full, duration, EasingTypes.OutExpo);
|
||||||
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 60, duration, EasingTypes.OutExpo);
|
this.MoveToY(MedalOverlay.DISC_SIZE / 2 - 60, duration, EasingTypes.OutExpo);
|
||||||
|
@ -81,8 +81,13 @@ namespace osu.Game.Overlays.Mods
|
|||||||
backgroundIcon.Icon = modAfter.Icon;
|
backgroundIcon.Icon = modAfter.Icon;
|
||||||
using (BeginDelayedSequence(mod_switch_duration, true))
|
using (BeginDelayedSequence(mod_switch_duration, true))
|
||||||
{
|
{
|
||||||
foregroundIcon.RotateTo(-rotate_angle * direction).RotateTo(0f, mod_switch_duration, mod_switch_easing);
|
foregroundIcon
|
||||||
backgroundIcon.RotateTo(rotate_angle * direction).RotateTo(0f, mod_switch_duration, mod_switch_easing);
|
.RotateTo(-rotate_angle * direction)
|
||||||
|
.RotateTo(0f, mod_switch_duration, mod_switch_easing);
|
||||||
|
|
||||||
|
backgroundIcon
|
||||||
|
.RotateTo(rotate_angle * direction)
|
||||||
|
.RotateTo(0f, mod_switch_duration, mod_switch_easing);
|
||||||
|
|
||||||
Schedule(() => displayMod(modAfter));
|
Schedule(() => displayMod(modAfter));
|
||||||
}
|
}
|
||||||
|
@ -155,9 +155,11 @@ namespace osu.Game.Overlays
|
|||||||
textLine3.Text = shortcut.ToUpper();
|
textLine3.Text = shortcut.ToUpper();
|
||||||
|
|
||||||
box.Animate(
|
box.Animate(
|
||||||
b => b.FadeIn(500, EasingTypes.OutQuint).ResizeHeightTo(height, 500, EasingTypes.OutQuint)
|
b => b.FadeIn(500, EasingTypes.OutQuint),
|
||||||
|
b => b.ResizeHeightTo(height, 500, EasingTypes.OutQuint)
|
||||||
).Then(
|
).Then(
|
||||||
b => b.FadeOutFromOne(1500, EasingTypes.InQuint).ResizeHeightTo(height_contracted, 1500, EasingTypes.InQuint)
|
b => b.FadeOutFromOne(1500, EasingTypes.InQuint),
|
||||||
|
b => b.ResizeHeightTo(height_contracted, 1500, EasingTypes.InQuint)
|
||||||
);
|
);
|
||||||
|
|
||||||
int optionCount = 0;
|
int optionCount = 0;
|
||||||
|
@ -131,9 +131,11 @@ namespace osu.Game.Screens.Menu
|
|||||||
icon.RotateTo(rightward ? 10 : -10, duration * 2, EasingTypes.InOutSine);
|
icon.RotateTo(rightward ? 10 : -10, duration * 2, EasingTypes.InOutSine);
|
||||||
|
|
||||||
icon.Animate(
|
icon.Animate(
|
||||||
i => i.MoveToY(-10, duration, EasingTypes.Out).ScaleTo(1, duration, EasingTypes.Out)
|
i => i.MoveToY(-10, duration, EasingTypes.Out),
|
||||||
|
i => i.ScaleTo(1, duration, EasingTypes.Out)
|
||||||
).Then(
|
).Then(
|
||||||
i => i.MoveToY(0, duration, EasingTypes.In).ScaleTo(new Vector2(1, 0.9f), duration, EasingTypes.In)
|
i => i.MoveToY(0, duration, EasingTypes.In),
|
||||||
|
i => i.ScaleTo(new Vector2(1, 0.9f), duration, EasingTypes.In)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +229,9 @@ namespace osu.Game.Screens.Menu
|
|||||||
buttonAreaBackground.ScaleTo(Vector2.One, 500, EasingTypes.Out);
|
buttonAreaBackground.ScaleTo(Vector2.One, 500, EasingTypes.Out);
|
||||||
buttonArea.FadeOut(300);
|
buttonArea.FadeOut(300);
|
||||||
|
|
||||||
osuLogo.Delay(150).ScaleTo(1, 800, EasingTypes.OutExpo).MoveTo(Vector2.Zero, 800, EasingTypes.OutExpo);
|
osuLogo.Delay(150)
|
||||||
|
.ScaleTo(1, 800, EasingTypes.OutExpo)
|
||||||
|
.MoveTo(Vector2.Zero, 800, EasingTypes.OutExpo);
|
||||||
|
|
||||||
foreach (Button b in buttonsTopLevel)
|
foreach (Button b in buttonsTopLevel)
|
||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
|
@ -91,7 +91,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
private void flash(Drawable d, double beatLength, bool kiai, TrackAmplitudes amplitudes)
|
private void flash(Drawable d, double beatLength, bool kiai, TrackAmplitudes amplitudes)
|
||||||
{
|
{
|
||||||
d.FadeTo(Math.Max(0, ((d.Equals(leftBox) ? amplitudes.LeftChannel : amplitudes.RightChannel) - amplitude_dead_zone) / (kiai ? kiai_multiplier : alpha_multiplier)), box_fade_in_time)
|
d.FadeTo(Math.Max(0, ((d.Equals(leftBox) ? amplitudes.LeftChannel : amplitudes.RightChannel) - amplitude_dead_zone) / (kiai ? kiai_multiplier : alpha_multiplier)), box_fade_in_time)
|
||||||
.Then().FadeOut(beatLength, EasingTypes.In);
|
.Then()
|
||||||
|
.FadeOut(beatLength, EasingTypes.In);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -239,21 +239,30 @@ namespace osu.Game.Screens.Menu
|
|||||||
if (IsHovered)
|
if (IsHovered)
|
||||||
this.Delay(early_activation).Schedule(() => sampleBeat.Play());
|
this.Delay(early_activation).Schedule(() => sampleBeat.Play());
|
||||||
|
|
||||||
logoBeatContainer.ScaleTo(1 - 0.02f * amplitudeAdjust, early_activation, EasingTypes.Out)
|
logoBeatContainer
|
||||||
.Then().ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
.ScaleTo(1 - 0.02f * amplitudeAdjust, early_activation, EasingTypes.Out)
|
||||||
|
.Then()
|
||||||
|
.ScaleTo(1, beatLength * 2, EasingTypes.OutQuint);
|
||||||
|
|
||||||
ripple.ClearTransforms();
|
ripple.ClearTransforms();
|
||||||
|
ripple
|
||||||
ripple.ScaleTo(logoAmplitudeContainer.Scale).ScaleTo(logoAmplitudeContainer.Scale * (1 + 0.04f * amplitudeAdjust), beatLength, EasingTypes.OutQuint);
|
.ScaleTo(logoAmplitudeContainer.Scale)
|
||||||
ripple.FadeTo(0.15f * amplitudeAdjust).FadeOut(beatLength, EasingTypes.OutQuint);
|
.ScaleTo(logoAmplitudeContainer.Scale * (1 + 0.04f * amplitudeAdjust), beatLength, EasingTypes.OutQuint)
|
||||||
|
.FadeTo(0.15f * amplitudeAdjust).FadeOut(beatLength, EasingTypes.OutQuint);
|
||||||
|
|
||||||
if (effectPoint.KiaiMode && flashLayer.Alpha < 0.4f)
|
if (effectPoint.KiaiMode && flashLayer.Alpha < 0.4f)
|
||||||
{
|
{
|
||||||
flashLayer.ClearTransforms();
|
flashLayer.ClearTransforms();
|
||||||
visualizer.ClearTransforms();
|
flashLayer
|
||||||
|
.FadeTo(0.2f * amplitudeAdjust, early_activation, EasingTypes.Out)
|
||||||
|
.Then()
|
||||||
|
.FadeOut(beatLength);
|
||||||
|
|
||||||
flashLayer.FadeTo(0.2f * amplitudeAdjust, early_activation, EasingTypes.Out).Then().FadeOut(beatLength);
|
visualizer.ClearTransforms();
|
||||||
visualizer.FadeTo(0.9f * amplitudeAdjust, early_activation, EasingTypes.Out).Then().FadeTo(0.5f, beatLength);
|
visualizer
|
||||||
|
.FadeTo(0.9f * amplitudeAdjust, early_activation, EasingTypes.Out)
|
||||||
|
.Then()
|
||||||
|
.FadeTo(0.5f, beatLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,8 +272,11 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
dimLevel.ValueChanged += newDim => Background?.FadeTo(1 - (float)newDim, 800);
|
dimLevel.ValueChanged += newDim => Background?.FadeTo(1 - (float)newDim, 800);
|
||||||
|
|
||||||
Content.ScaleTo(0.7f).ScaleTo(1, 750, EasingTypes.OutQuint);
|
Content
|
||||||
Content.Delay(250).FadeIn(250);
|
.ScaleTo(0.7f)
|
||||||
|
.ScaleTo(1, 750, EasingTypes.OutQuint)
|
||||||
|
.Delay(250)
|
||||||
|
.FadeIn(250);
|
||||||
|
|
||||||
this.Delay(750).Schedule(() =>
|
this.Delay(750).Schedule(() =>
|
||||||
{
|
{
|
||||||
|
@ -67,16 +67,23 @@ namespace osu.Game.Screens.Ranking
|
|||||||
modeChangeButtons.FadeOut();
|
modeChangeButtons.FadeOut();
|
||||||
currentPage.FadeOut();
|
currentPage.FadeOut();
|
||||||
|
|
||||||
circleOuterBackground.FadeIn(transition_time, EasingTypes.OutQuint).ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuterBackground
|
||||||
|
.FadeIn(transition_time, EasingTypes.OutQuint)
|
||||||
|
.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
using (BeginDelayedSequence(transition_time * 0.25f, true))
|
using (BeginDelayedSequence(transition_time * 0.25f, true))
|
||||||
{
|
{
|
||||||
circleOuter.FadeIn(transition_time, EasingTypes.OutQuint).ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
circleOuter
|
||||||
|
.FadeIn(transition_time, EasingTypes.OutQuint)
|
||||||
|
.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
using (BeginDelayedSequence(transition_time * 0.3f, true))
|
using (BeginDelayedSequence(transition_time * 0.3f, true))
|
||||||
{
|
{
|
||||||
backgroundParallax.FadeIn(transition_time, EasingTypes.OutQuint);
|
backgroundParallax.FadeIn(transition_time, EasingTypes.OutQuint);
|
||||||
circleInner.FadeIn(transition_time, EasingTypes.OutQuint).ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
|
||||||
|
circleInner
|
||||||
|
.FadeIn(transition_time, EasingTypes.OutQuint)
|
||||||
|
.ScaleTo(1, transition_time, EasingTypes.OutQuint);
|
||||||
|
|
||||||
using (BeginDelayedSequence(transition_time * 0.4f, true))
|
using (BeginDelayedSequence(transition_time * 0.4f, true))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user