private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject == PlayerController.player1.gameObject) { Debug.Log("Player1 is going " + wallDir.ToString()); isPlayer1Inside = true; } else if (collision.gameObject == PlayerController.player2.gameObject) { isPlayer2Inside = true; } }
public override string ToString() { return($"Building: {building?.name}, {buildingPosition} | Wall: {direction.ToString()}"); }