]> Untitled Git - catris.git/blobdiff - script/piece.gd
Broken: doesn't rotate correctly on the right side
[catris.git] / script / piece.gd
index fb82e449a0542f75827d1e8209723f221821f537..51582416c87a1cd8f8b6445425dee077a2196de4 100644 (file)
@@ -52,8 +52,17 @@ func get_cell_grid() -> Array:
        return _cell_grid.duplicate()
 
 
        return _cell_grid.duplicate()
 
 
-func rotate_left():
+func rotate_cells_right():
+       _rotation_index -= 1
+       rotate_cells()
+
+
+func rotate_cells_left():
        _rotation_index += 1
        _rotation_index += 1
+       rotate_cells()
+
+
+func rotate_cells():
        var new_cell_grid = get_cell_grid()
        
        for c in cells:
        var new_cell_grid = get_cell_grid()
        
        for c in cells: