Tough_Crowd/godot/scenes/Boundary.gd

23 lines
430 B
GDScript3
Raw Permalink 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
2024-01-28 11:32:09 +00:00
2024-01-26 20:01:22 +00:00
# Called when the node enters the scene tree for the first time.
func _ready():
2024-01-28 11:32:09 +00:00
pass # Replace with function body.
2024-01-26 20:01:22 +00:00
# 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
2024-01-28 11:32:09 +00:00
2024-01-26 20:01:22 +00:00
func get_most_left_position():
return global_position.x - width / 2
2024-01-28 11:32:09 +00:00
2024-01-26 20:01:22 +00:00
func get_most_right_position():
return global_position.x + width / 2