mirror of
https://github.com/JHDev2006/Super-Mario-Bros.-Remastered-Public.git
synced 2025-10-22 07:28:14 +00:00
13 lines
258 B
GDScript
13 lines
258 B
GDScript
@tool
|
|
extends CollisionPolygon2D
|
|
|
|
@export var offset := Vector2.ZERO
|
|
@export var height := 0.0
|
|
|
|
func _physics_process(_delta: float) -> void:
|
|
update()
|
|
|
|
func update() -> void:
|
|
var height_to_use = height
|
|
position.y = -height_to_use / 2 * scale.y - offset.y
|