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

Use timepreempt and put appeartime and move duration into their own vars.

This commit is contained in:
miterosan 2018-08-05 15:38:27 +02:00
parent 8ad8c2b6d0
commit d1ffb7c2d7

View File

@ -39,15 +39,15 @@ namespace osu.Game.Rulesets.Osu.Mods
Vector2 originalPosition = drawable.Position; Vector2 originalPosition = drawable.Position;
// avoiding that the player can see the abroupt move. const float appear_distance = 250;
const int pre_time_offset = 1000; double appearTime = hitObject.StartTime - hitObject.TimePreempt - 1;
const float appearDistance = 250; double moveDuration = hitObject.TimePreempt + 1;
using (drawable.BeginAbsoluteSequence(hitObject.StartTime - hitObject.TimeFadeIn - pre_time_offset, true)) using (drawable.BeginAbsoluteSequence(appearTime, true))
{ {
drawable drawable
.MoveToOffset(new Vector2((float)Math.Cos(theta), (float)Math.Sin(theta)) * appearDistance) .MoveToOffset(new Vector2((float)Math.Cos(theta), (float)Math.Sin(theta)) * appear_distance)
.MoveTo(originalPosition, hitObject.TimeFadeIn + pre_time_offset, Easing.InOutSine); .MoveTo(originalPosition, moveDuration, Easing.InOutSine);
} }