private void OnTriggerEnter2D(Collider2D other)
    {
        var tsumu = other.gameObject.GetComponent <Tsumu>();

        if (!tsumu || _parent.GetType() != tsumu.GetType())
        {
            return;
        }
        _parent.Collection.SetNeighbor(_parent.TargetId, _parent.Id, tsumu.Id);
        if (tsumu.State != TsumuState.Normal && _parent.State == TsumuState.Normal)
        {
            _parent.Collection.Search(_parent.TargetId, tsumu.Id);
        }
        //Neighbors.Add(tsumu);
    }
Beispiel #2
0
 public void SearchErasable(Tsumu tsumu)
 {
     if (_isSearchingErasable || _erasableSet.Count > 0 && _erasableSet.First().GetType() != tsumu.GetType())
     {
         return;
     }
     _isSearchingErasable = true;
     SearchToErase(tsumu);
     _isSearchingErasable = false;
 }