예제 #1
0
 public static T GetControl<T>()
 {
     if(typeof(T) == typeof(GameTimeControl)
     {
         return GameTimeControl.Instance();
     }
     // TODO: other singletons
     return null;
 }
예제 #2
0
 /// <summary>
 /// Sets the value of a tag in the format of a <see cref="ResultReason" />.
 /// </summary>
 /// <param name="gameTag">The tag.</param>
 /// <param name="timeControl">The result.</param>
 public static void SetTimeControlValue(this GameTag gameTag, GameTimeControl timeControl) =>
 gameTag.Value = TimeControlConverters.ToStandardTimeControlString(timeControl);