void TriggerOnDetect() { PatternDetected?.Invoke(); Debug.Log("Pattern Detected!"); GoToState(0); }
private void isPattern(int x, int y) { if (isBlock(x, y)) { PatternDetected?.Invoke(this, new PatternInfoEventArgs(x, y, Block)); } else if (x > 0 && isHive(x - 1, y)) { PatternDetected?.Invoke(this, new PatternInfoEventArgs(x, y, Hive)); } else if (isFlasher(x, y)) { PatternDetected?.Invoke(this, new PatternInfoEventArgs(x, y, Flasher)); } else if (x > 0 && isGlider(x - 1, y)) { PatternDetected?.Invoke(this, new PatternInfoEventArgs(x, y, Glider)); } else if (x > 1 && isPentaDecathlon(x - 2, y)) { PatternDetected?.Invoke(this, new PatternInfoEventArgs(x, y, Pentadecathlon)); } }