Skip to content

Commit b9c44fe

Browse files
committed
fix(Util): Use more generic collection
1 parent 1298f55 commit b9c44fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Assets/JCSUnity/Scripts/Util/JCS_Util.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Copyright (c) 2016 by Shen, Jen-Chieh $
88
*/
99
using System.Linq;
10+
using System.Collections;
1011
using System.Collections.Generic;
1112
using System.Text;
1213
using Unity.VisualScripting;
@@ -142,7 +143,7 @@ public static bool WithInRange(float minRange, float maxRange, float currentVal)
142143
/// With in collection range.
143144
/// </summary>
144145
/// <returns></returns>
145-
public static bool WithInRange<T>(int index, ICollection<T> arr)
146+
public static bool WithInRange(int index, ICollection arr)
146147
{
147148
return index >= 0 && index < arr.Count;
148149
}
@@ -154,7 +155,7 @@ public static bool WithInRange<T>(int index, ICollection<T> arr)
154155
/// <param name="index"> Index </param>
155156
/// <param name="arr"> List. </param>
156157
/// <returns> index that looped. </returns>
157-
public static int LoopIn<T>(int index, ICollection<T> arr)
158+
public static int LoopIn(int index, ICollection arr)
158159
{
159160
// loop through the array, if at the tail of the array set it to head.
160161
if (index < 0)

0 commit comments

Comments
 (0)