public static void LightningStrike(int x, int y) { flsh = GameObject.Find("Flash").GetComponent <Flash> (); flsh.FlashBang(); for (int a = y + 3; a >= y - 3; a--) { for (int b = x - (3 - abs(a - y)); b <= x + (3 - abs(a - y)); b++) { if (((b >= 0) && (b < w)) && (a >= 0) && (a < h) && (grid [b, a] != null)) { Destroy(grid [b, a].gameObject); grid [b, a] = null; } } } }