Global refactor
This commit is contained in:
parent
3868af29e3
commit
0589ca4e23
180 changed files with 249 additions and 401 deletions
|
|
@ -1,23 +0,0 @@
|
|||
extends Area3D
|
||||
|
||||
class_name PlantSite
|
||||
|
||||
var players_on_site: Array[int]
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
body_entered.connect(on_body_entered)
|
||||
body_exited.connect(on_body_exited)
|
||||
|
||||
Session.plants.append(self)
|
||||
|
||||
func on_body_entered(body: Node3D):
|
||||
if body is Player:
|
||||
players_on_site.append(int(body.name))
|
||||
|
||||
func on_body_exited(body: Node3D):
|
||||
if body is Player:
|
||||
players_on_site.erase(int(body.name))
|
||||
|
||||
func is_player_on_site(id: int):
|
||||
return players_on_site.has(id)
|
||||
Loading…
Add table
Add a link
Reference in a new issue