예제 #1
0
 /// <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);
 }
예제 #2
0
 public static void InvokeCrashed(CrashedEventArgs e)
 {
     OnCrashed?.Invoke(e);
 }
예제 #3
0
 protected void TriggerCrashMessage()
 {
     m_StopWorking = true;
     OnCrashed?.Invoke(this, null);
 }