A game framework written with osu! in mind.
at master 23 lines 919 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.Graphics.Pooling 7{ 8 public interface IDrawablePool 9 { 10 /// <summary> 11 /// Get a drawable from this pool. 12 /// </summary> 13 /// <param name="setupAction">An optional action to be performed on this drawable immediately after retrieval. Should generally be used to prepare the drawable into a usable state.</param> 14 /// <returns>The drawable.</returns> 15 PoolableDrawable Get(Action<PoolableDrawable> setupAction = null); 16 17 /// <summary> 18 /// Return a drawable after use. 19 /// </summary> 20 /// <param name="pooledDrawable">The drwable to return. Should have originally come from this pool.</param> 21 void Return(PoolableDrawable pooledDrawable); 22 } 23}