Tough_Crowd/godot/scenes/Boundary.gd

19 lines
426 B
GDScript3
Raw Normal View History

2024-01-26 20:01:22 +00:00
class_name Boundary
extends Node2D
2024-01-26 21:10:03 +00:00
@export var width = 200.
2024-01-26 20:01:22 +00:00
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
2024-01-26 21:10:03 +00:00
func _process(_delta):
2024-01-26 20:01:22 +00:00
pass
func get_most_left_position():
return global_position.x - width / 2
func get_most_right_position():
return global_position.x + width / 2