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,31 @@
@tool
extends Node2D
class_name SS2D_Shape_Render
## Node is used to render shape geometry.
var mesh: SS2D_Mesh = null : set = set_mesh
func set_mesh(m: SS2D_Mesh) -> void:
mesh = m
if m != null:
if m.force_no_tiling:
texture_repeat = CanvasItem.TEXTURE_REPEAT_DISABLED
else:
texture_repeat = CanvasItem.TEXTURE_REPEAT_PARENT_NODE
material = mesh.material
z_index = mesh.z_index
z_as_relative = mesh.z_as_relative
show_behind_parent = mesh.show_behind_parent
else:
material = null
z_index = 0
z_as_relative = true
show_behind_parent = false
queue_redraw()
func _draw() -> void:
if mesh != null:
mesh.render(self)