/// <summary> /// Makes the argument objectToMakeUnused marked as unused. This method is generated to be used /// by generated code. Use Destroy instead when writing custom code so that your code will behave /// the same whether your Entity is pooled or not. /// </summary> public static void MakeUnused(TileEntity objectToMakeUnused, bool callDestroy) { mPool.MakeUnused(objectToMakeUnused); if (callDestroy) { objectToMakeUnused.Destroy(); } }
private static void FactoryInitialize() { const int numberToPreAllocate = 20; for (int i = 0; i < numberToPreAllocate; i++) { TileEntity instance = new TileEntity(mContentManagerName, false); mPool.AddToPool(instance); } }
/// <summary> /// Makes the argument objectToMakeUnused marked as unused. This method is generated to be used /// by generated code. Use Destroy instead when writing custom code so that your code will behave /// the same whether your Entity is pooled or not. /// </summary> public static void MakeUnused(TileEntity objectToMakeUnused) { MakeUnused(objectToMakeUnused, true); }