Exemplo n.º 1
0
 public static void Release(StackResourceSortingKey key)
 {
     if (key != null)
     {
         key.ReleaseResource();
     }
 }
Exemplo n.º 2
0
    /// <summary>
    /// Adjusts the timescale. The returned key must be used to unregister the adjustment and return it to normal.
    /// </summary>
    public StackResourceSortingKey AdjustTimeScale(float timeScale)
    {
        var resourceKey = new StackResourceSortingKey(0, key => timeScaleAdjustments.Remove(key));

        timeScaleAdjustments.Add(resourceKey, timeScale);
        return(resourceKey);
    }