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);
|
||||
}
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Utils/Vector2IntUtils.cs.meta
Normal file
3
Assets/Scripts/Utils/Vector2IntUtils.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a5066db9b0b4aadba9aa22854bb4cf9
|
||||
timeCreated: 1765697266
|
||||
Reference in New Issue
Block a user