Add lever and jump pad components with activation logic

This commit is contained in:
2025-04-25 22:41:35 +02:00
parent 9b2ca61163
commit 8959fd4b9f
323 changed files with 12844 additions and 18 deletions

View File

@@ -0,0 +1,26 @@
extends SS2D_Action
## ActionMakeShapeUnique
var _shape: SS2D_Shape
var _old_array: SS2D_Point_Array
var _new_array: SS2D_Point_Array
func _init(shape: SS2D_Shape) -> void:
_shape = shape
_old_array = shape.get_point_array()
_new_array = _shape.get_point_array().clone(true)
func get_name() -> String:
return "Make Shape Unique"
func do() -> void:
_shape.set_point_array(_new_array)
func undo() -> void:
_shape.set_point_array(_old_array)