private void OnTriggerExit2D(Collider2D collision) { if (collision.transform.CompareTag("Map Piece")) { _hasMapPieces = false; _currentMapPiece = null; } }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.transform.CompareTag("Map Piece")) { _hasMapPieces = true; _currentMapPiece = collision.GetComponent <MapPiecesController>(); } }
private void OnMovingUp() { foreach (PivotDetail i in _pivotList) { if (i.CanMoveToDirection((int)directions.UP)) { _currentMapPiece = i.GetCurrentMapPiece(); _currentMapPiece.MoveToPivot((int)directions.UP); _isMoving = true; return; } } }