Add basic beat response to osu! logo

This commit is contained in:
Dean Herbert
2017-05-23 12:29:43 +09:00
parent d1eb8937b7
commit 3e0aaa1aa0
2 changed files with 106 additions and 76 deletions

View File

@ -16,12 +16,19 @@ namespace osu.Game.Graphics.Containers
private int lastBeat;
private ControlPoint lastControlPoint;
/// <summary>
/// The amount of time before a beat we should fire <see cref="OnNewBeat(int, double, TimeSignatures, bool)"/>.
/// This allows for adding easing to animations that may be synchronised to the beat.
/// </summary>
protected double EarlyActivationMilliseconds;
protected override void Update()
{
if (beatmap.Value?.Track == null)
return;
double currentTrackTime = beatmap.Value.Track.CurrentTime;
double currentTrackTime = beatmap.Value.Track.CurrentTime + EarlyActivationMilliseconds;
ControlPoint overridePoint;
ControlPoint controlPoint = beatmap.Value.Beatmap.TimingInfo.TimingPointAt(currentTrackTime, out overridePoint);