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