From 6d2016c9e94cb231b60dfd03a4604cbd2b34bac4 Mon Sep 17 00:00:00 2001 From: Nathan Lovato Date: Tue, 11 Feb 2020 13:18:22 -0600 Subject: [PATCH] Handle and remove warnings in GSAI* classes --- project/demos/AvoidCollisions/Spawner.gd | 2 +- project/src/Agents/GSAISpecializedAgent.gd | 2 +- project/src/GSAIGroupBehavior.gd | 2 +- project/src/GSAISteeringBehavior.gd | 4 ++-- project/src/Proximities/GSAIProximity.gd | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/project/demos/AvoidCollisions/Spawner.gd b/project/demos/AvoidCollisions/Spawner.gd index 035be60..e6c68ec 100644 --- a/project/demos/AvoidCollisions/Spawner.gd +++ b/project/demos/AvoidCollisions/Spawner.gd @@ -37,7 +37,7 @@ func _ready() -> void: child.set_proximity_agents(avoider_agents) -func _physics_process(delta: float) -> void: +func _physics_process(_delta: float) -> void: for child in get_children(): child.global_position = child.global_position.posmodv(boundaries) diff --git a/project/src/Agents/GSAISpecializedAgent.gd b/project/src/Agents/GSAISpecializedAgent.gd index f6389b9..e4b81ed 100644 --- a/project/src/Agents/GSAISpecializedAgent.gd +++ b/project/src/Agents/GSAISpecializedAgent.gd @@ -36,5 +36,5 @@ var _applied_steering := false # Moves the agent's body by target `acceleration`. # tags: virtual -func _apply_steering(acceleration: GSAITargetAcceleration, delta: float) -> void: +func _apply_steering(_acceleration: GSAITargetAcceleration, _delta: float) -> void: pass diff --git a/project/src/GSAIGroupBehavior.gd b/project/src/GSAIGroupBehavior.gd index d45a4f6..705fe07 100644 --- a/project/src/GSAIGroupBehavior.gd +++ b/project/src/GSAIGroupBehavior.gd @@ -16,5 +16,5 @@ func _init(agent: GSAISteeringAgent, proximity: GSAIProximity).(agent) -> void: # Internal callback for the behavior to define whether or not a member is # relevant # tags: virtual -func _report_neighbor(neighbor: GSAISteeringAgent) -> bool: +func _report_neighbor(_neighbor: GSAISteeringAgent) -> bool: return false diff --git a/project/src/GSAISteeringBehavior.gd b/project/src/GSAISteeringBehavior.gd index 5920f00..cc00ca2 100644 --- a/project/src/GSAISteeringBehavior.gd +++ b/project/src/GSAISteeringBehavior.gd @@ -14,8 +14,8 @@ var is_enabled := true var agent: GSAISteeringAgent -func _init(agent: GSAISteeringAgent) -> void: - self.agent = agent +func _init(_agent: GSAISteeringAgent) -> void: + self.agent = _agent # Sets the `acceleration` with the behavior's desired amount of acceleration. diff --git a/project/src/Proximities/GSAIProximity.gd b/project/src/Proximities/GSAIProximity.gd index f7ccfae..a820e3a 100644 --- a/project/src/Proximities/GSAIProximity.gd +++ b/project/src/Proximities/GSAIProximity.gd @@ -19,5 +19,5 @@ func _init(agent: GSAISteeringAgent, agents: Array) -> void: # `_find_neighbors` calls `callback` for each agent in the `agents` array and # adds one to the count if its `callback` returns true. # tags: virtual -func _find_neighbors(callback: FuncRef) -> int: +func _find_neighbors(_callback: FuncRef) -> int: return 0