Fixed Object Pooling and cascading
This commit is contained in:
14
Assets/Scripts/Utils/Vector2IntUtils.cs
Normal file
14
Assets/Scripts/Utils/Vector2IntUtils.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Utils {
|
||||
public static class Vector2IntUtils {
|
||||
public static bool Compare(this Vector2Int a, Vector2 b) {
|
||||
Vector2 aVector2 = new Vector2(a.x, a.y);
|
||||
return Vector2.Distance(aVector2, b) < 0.01f;
|
||||
}
|
||||
|
||||
public static Vector2 ToVector2(this Vector2Int v) {
|
||||
return new Vector2(v.x, v.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user