private void CheckProbe(bool IsFinal) { var Index = new QuickIndex(ElementsCount_); if (Elements_.ContainsKey(Index.GetHashCode())) { var Node = Elements_[Index.GetHashCode()]; if (IsFinal) { OnSucceed?.Invoke(Node); } else { OnProbe?.Invoke(Node); } } else { if (IsFinal) { OnFailed?.Invoke(); } else { OnProbe?.Invoke(null); } } }
public void AddNode(QuickIndex Index, QuickNode Node) { if (Elements_.ContainsKey(Index.GetHashCode())) { UnityEngine.Debug.LogWarning($"Repeat QuickNode {Node.ID}"); return; } Elements_.Add(Index.GetHashCode(), Node); }