A game framework written with osu! in mind.
at master 1.1 kB view raw
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. 2// See the LICENCE file in the repository root for full licence text. 3 4namespace osu.Framework.Timing 5{ 6 /// <summary> 7 /// A clock that can be started, stopped, reset etc. 8 /// </summary> 9 public interface IAdjustableClock : IClock 10 { 11 /// <summary> 12 /// Stop and reset position. 13 /// </summary> 14 void Reset(); 15 16 /// <summary> 17 /// Start (resume) running. 18 /// </summary> 19 void Start(); 20 21 /// <summary> 22 /// Stop (pause) running. 23 /// </summary> 24 void Stop(); 25 26 /// <summary> 27 /// Seek to a specific time position. 28 /// </summary> 29 /// <returns>Whether a seek was possible.</returns> 30 bool Seek(double position); 31 32 /// <summary> 33 /// The rate this clock is running at, relative to real-time. 34 /// </summary> 35 new double Rate { get; set; } 36 37 /// <summary> 38 /// Reset the rate to a stable value. 39 /// </summary> 40 void ResetSpeedAdjustments(); 41 } 42}