Exemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.GetComponent <Wall>())
     {
         Wall wall = other.gameObject.GetComponent <Wall>();
         if (walls.Contains(wall))
         {
             Debug.LogError("This room is already registered to this wall1");
         }
         walls.Add(wall);
         wall.AddRoom(this);
     }
 }