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,33 @@
@tool
extends Node
class_name SS2D_Common_Functions
static func sort_z(a, b) -> bool:
if a.z_index < b.z_index:
return true
return false
static func sort_int_ascending(a: int, b: int) -> bool:
if a < b:
return true
return false
static func sort_int_descending(a: int, b: int) -> bool:
if a < b:
return false
return true
static func to_vector3(vector: Vector2) -> Vector3:
return Vector3(vector.x, vector.y, 0)
static func merge_arrays(arrays: Array) -> Array:
var new_array := []
for array: Array in arrays:
for v: Variant in array:
new_array.push_back(v)
return new_array