예제 #1
0
 private void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.transform.CompareTag("Map Piece"))
     {
         _hasMapPieces    = false;
         _currentMapPiece = null;
     }
 }
예제 #2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.transform.CompareTag("Map Piece"))
     {
         _hasMapPieces    = true;
         _currentMapPiece = collision.GetComponent <MapPiecesController>();
     }
 }
예제 #3
0
 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;
         }
     }
 }