/// <summary> /// Calcs whether the snake crashed or not. /// </summary> /// <param name="position">The test position.</param> /// <returns></returns> private bool CrashTest(Position position) { IsCrashed = Body.Any(x => x.CurPosition.Equals(position)); if (IsCrashed) { OnCrashed?.Invoke(); } return(IsCrashed); }
public static void InvokeCrashed(CrashedEventArgs e) { OnCrashed?.Invoke(e); }
protected void TriggerCrashMessage() { m_StopWorking = true; OnCrashed?.Invoke(this, null); }