Browse Source

actually implemented ExposedList.Clear(bool clearArray)

ZimM 10 năm trước cách đây
mục cha
commit
5336eedc2f
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      spine-csharp/src/ExposedList.cs

+ 3 - 1
spine-csharp/src/ExposedList.cs

@@ -142,7 +142,9 @@ namespace Spine {
 		}
 
 		public void Clear(bool clearArray = true) {
-			Array.Clear(Items, 0, Items.Length);
+			if (clearArray)
+				Array.Clear(Items, 0, Items.Length);
+
 			Count = 0;
 			version++;
 		}