A game framework written with osu! in mind.
at master 32 lines 636 B 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 4using System; 5 6namespace osu.Framework.Allocation 7{ 8 public class ObjectUsage<T> : IDisposable 9 where T : class 10 { 11 public T Object; 12 public int Index; 13 14 public long FrameId; 15 16 internal Action<ObjectUsage<T>, UsageType> Finish; 17 18 public UsageType Usage; 19 20 public void Dispose() 21 { 22 Finish?.Invoke(this, Usage); 23 } 24 } 25 26 public enum UsageType 27 { 28 None, 29 Read, 30 Write 31 } 32}