Testing collisionPolygon2D for Bridge for simplification of programming.

This commit is contained in:
2025-06-21 18:24:30 -03:00
parent d8b4402926
commit 57b67e6d98
7 changed files with 90 additions and 12 deletions

View File

@@ -0,0 +1,12 @@
extends Area2D
class_name BridgeArea
func _on_body_entered(_body: Node2D) -> void:
if _body is BaseCharacter:
_body.update_collision_layer_mask("in")
print("entered!")
func _on_body_exited(_body: Node2D) -> void:
if _body is BaseCharacter:
_body.update_collision_layer_mask("out")
print("exited!")

View File

@@ -0,0 +1 @@
uid://dirg5mq4y4nk0