예제 #1
0
    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);
    }
예제 #2
0
    public void Execute(int index)
    {
        var key = PowderGame.CoordKey(powders[index].coord);

        hashMap.TryAdd(key, index);
    }