コード例 #1
0
 /// <summary>
 /// Создание MList с указанием массива который будет качестве лежащего в основе MList.
 /// </summary>
 /// <param name="array"></param>
 /// <param name="growMode"></param>
 /// <param name="growFactor"></param>
 /// <param name="growLinear"></param>
 public MList(T[] array, GrowMode growMode, double growFactor, int growLinear)
 {
     AssignArray(array);
     Grow       = growMode;
     GrowFactor = growFactor;
     GrowLen    = growLinear;
 }
コード例 #2
0
 /// <summary>
 /// Начальная ёмкость массива будет 2 элемента.
 /// </summary>
 /// <param name="growMode"></param>
 /// <param name="growFactor"></param>
 /// <param name="growLinear"></param>
 public MList(GrowMode growMode, double growFactor, int growLinear)
 {
     Grow       = growMode;
     Capacity   = InitialCapacity;
     Data       = new T[InitialCapacity];
     GrowFactor = growFactor;
     GrowLen    = growLinear;
 }
コード例 #3
0
ファイル: ObjectPool.cs プロジェクト: GastonBC/AECH-Treehouse
 public ObjectPool(GameObject sourceObject, int numPooled, GrowMode growMode)
 {
     _sourceObject = sourceObject;
     _growMode     = growMode;
 }