13 lines
355 B
GDScript3
13 lines
355 B
GDScript3
|
extends Area3D
|
||
|
|
||
|
var passPeopleCount = 0
|
||
|
|
||
|
func _ready():
|
||
|
self.connect("area_entered",Callable(self,"_on_area_entered"))
|
||
|
|
||
|
func _on_area_entered(area: Area3D) -> void:
|
||
|
var peopleWalkFollow = area.get_parent().get_parent()
|
||
|
if peopleWalkFollow is PlayerPathFollow :
|
||
|
passPeopleCount += 1
|
||
|
self.disconnect("area_entered",Callable(self,"_on_area_entered"))
|