Beginning of lesson 33. House polygon working and we are able to speak with NPC at world map, but not in starter town.
This commit is contained in:
@@ -5,8 +5,14 @@ class_name ToggleRoofTrigger
|
||||
@export var layerName:String
|
||||
|
||||
func execute(target):
|
||||
CommandDispatcher.TOGGLE_TILEMAP_LAYER.emit(layerName)
|
||||
pass
|
||||
|
||||
|
||||
func _on_area_entered(area: Area2D) -> void:
|
||||
execute(area.get_parent())
|
||||
CommandDispatcher.TOGGLE_TILEMAP_LAYER.emit(layerName, false)
|
||||
print("entered")
|
||||
|
||||
|
||||
func _on_area_exited(area: Area2D) -> void:
|
||||
CommandDispatcher.TOGGLE_TILEMAP_LAYER.emit(layerName, true)
|
||||
print("exited")
|
||||
|
||||
Reference in New Issue
Block a user