public static int GetPowderIndex(ref NativeHashMap <int, int> hashMap, int x, int y) { int index; if (hashMap.TryGetValue(PowderGame.CoordKey(x, y), out index)) { return(index); } return(-1); }
public void Execute(int index) { var key = PowderGame.CoordKey(powders[index].coord); hashMap.TryAdd(key, index); }