diff --git a/project/src/Agents/GSAIKinematicBody2DAgent.gd b/project/src/Agents/GSAIKinematicBody2DAgent.gd index d8cfc45..a956bdf 100644 --- a/project/src/Agents/GSAIKinematicBody2DAgent.gd +++ b/project/src/Agents/GSAIKinematicBody2DAgent.gd @@ -1,6 +1,6 @@ # A specialized steering agent that updates itself every frame so the user does # not have to using a KinematicBody2D -# category: Specialized agents +# @category - Specialized agents extends GSAISpecializedAgent class_name GSAIKinematicBody2DAgent @@ -31,7 +31,7 @@ func _init(_body: KinematicBody2D, _movement_type: int = MovementType.SLIDE) -> # Moves the agent's `body` by target `acceleration`. -# tags: virtual +# @tags - virtual func _apply_steering(acceleration: GSAITargetAcceleration, delta: float) -> void: _applied_steering = true match movement_type: diff --git a/project/src/Agents/GSAIKinematicBody3DAgent.gd b/project/src/Agents/GSAIKinematicBody3DAgent.gd index b5d3665..8fd9ef9 100644 --- a/project/src/Agents/GSAIKinematicBody3DAgent.gd +++ b/project/src/Agents/GSAIKinematicBody3DAgent.gd @@ -1,6 +1,6 @@ # A specialized steering agent that updates itself every frame so the user does # not have to using a KinematicBody -# category: Specialized agents +# @category - Specialized agents extends GSAISpecializedAgent class_name GSAIKinematicBody3DAgent @@ -31,7 +31,7 @@ func _init(_body: KinematicBody, _movement_type: int = MovementType.SLIDE) -> vo # Moves the agent's `body` by target `acceleration`. -# tags: virtual +# @tags - virtual func _apply_steering(acceleration: GSAITargetAcceleration, delta: float) -> void: _applied_steering = true match movement_type: diff --git a/project/src/Agents/GSAIRigidBody2DAgent.gd b/project/src/Agents/GSAIRigidBody2DAgent.gd index 7b4d79d..5b4708f 100644 --- a/project/src/Agents/GSAIRigidBody2DAgent.gd +++ b/project/src/Agents/GSAIRigidBody2DAgent.gd @@ -1,6 +1,6 @@ # A specialized steering agent that updates itself every frame so the user does # not have to using a RigidBody2D -# category: Specialized agents +# @category - Specialized agents extends GSAISpecializedAgent class_name GSAIRigidBody2DAgent @@ -21,7 +21,7 @@ func _init(_body: RigidBody2D) -> void: # Moves the agent's `body` by target `acceleration`. -# tags: virtual +# @tags - virtual func _apply_steering(acceleration: GSAITargetAcceleration, _delta: float) -> void: var _body: RigidBody2D = _body_ref.get_ref() if not _body: diff --git a/project/src/Agents/GSAIRigidBody3DAgent.gd b/project/src/Agents/GSAIRigidBody3DAgent.gd index f20343e..9cfe846 100644 --- a/project/src/Agents/GSAIRigidBody3DAgent.gd +++ b/project/src/Agents/GSAIRigidBody3DAgent.gd @@ -1,6 +1,6 @@ # A specialized steering agent that updates itself every frame so the user does # not have to using a RigidBody -# category: Specialized agents +# @category - Specialized agents extends GSAISpecializedAgent class_name GSAIRigidBody3DAgent @@ -20,7 +20,7 @@ func _init(_body: RigidBody) -> void: # Moves the agent's `body` by target `acceleration`. -# tags: virtual +# @tags - virtual func _apply_steering(acceleration: GSAITargetAcceleration, _delta: float) -> void: var _body: RigidBody = _body_ref.get_ref() if not _body: diff --git a/project/src/Agents/GSAISpecializedAgent.gd b/project/src/Agents/GSAISpecializedAgent.gd index b54cc6b..7bb98c4 100644 --- a/project/src/Agents/GSAISpecializedAgent.gd +++ b/project/src/Agents/GSAISpecializedAgent.gd @@ -1,7 +1,7 @@ # A base class for a specialized steering agent that updates itself every frame # so the user does not have to. All other specialized agents derive from this. -# category: Specialized agents -# tags: abstract +# @category - Specialized agents +# @tags - abstract extends GSAISteeringAgent class_name GSAISpecializedAgent @@ -34,6 +34,6 @@ var _applied_steering := false # Moves the agent's body by target `acceleration`. -# tags: virtual +# @tags - virtual func _apply_steering(_acceleration: GSAITargetAcceleration, _delta: float) -> void: pass diff --git a/project/src/Behaviors/GSAIArrive.gd b/project/src/Behaviors/GSAIArrive.gd index 31e04da..620bbae 100644 --- a/project/src/Behaviors/GSAIArrive.gd +++ b/project/src/Behaviors/GSAIArrive.gd @@ -1,6 +1,6 @@ # Calculates acceleration to take an agent to its target's location. The # calculation attempts to arrive with zero remaining velocity. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAIArrive extends GSAISteeringBehavior diff --git a/project/src/Behaviors/GSAIAvoidCollisions.gd b/project/src/Behaviors/GSAIAvoidCollisions.gd index 2133ff0..6c2af37 100644 --- a/project/src/Behaviors/GSAIAvoidCollisions.gd +++ b/project/src/Behaviors/GSAIAvoidCollisions.gd @@ -1,6 +1,6 @@ # Steers the agent to avoid obstacles in its path. Approximates obstacles as # spheres. -# category: Group behaviors +# @category - Group behaviors class_name GSAIAvoidCollisions extends GSAIGroupBehavior @@ -44,7 +44,7 @@ func _calculate_steering(acceleration: GSAITargetAcceleration) -> void: # Callback for the proximity to call when finding neighbors. Keeps track of every `neighbor` # that was found but only keeps the one the owning agent will most likely collide with. -# tags: virtual +# @tags - virtual func _report_neighbor(neighbor: GSAISteeringAgent) -> bool: var relative_position := neighbor.position - agent.position var relative_velocity := neighbor.linear_velocity - agent.linear_velocity diff --git a/project/src/Behaviors/GSAIBlend.gd b/project/src/Behaviors/GSAIBlend.gd index 2d159bb..053e789 100644 --- a/project/src/Behaviors/GSAIBlend.gd +++ b/project/src/Behaviors/GSAIBlend.gd @@ -6,7 +6,7 @@ # behavior : GSAISteeringBehavior, # weight : float # } -# category: Combination behaviors +# @category - Combination behaviors class_name GSAIBlend extends GSAISteeringBehavior diff --git a/project/src/Behaviors/GSAICohesion.gd b/project/src/Behaviors/GSAICohesion.gd index 096df38..909082a 100644 --- a/project/src/Behaviors/GSAICohesion.gd +++ b/project/src/Behaviors/GSAICohesion.gd @@ -1,6 +1,6 @@ # Calculates an acceleration that attempts to move the agent towards the center # of mass of the agents in the area defined by the `GSAIProximity`. -# category: Group behaviors +# @category - Group behaviors class_name GSAICohesion extends GSAIGroupBehavior @@ -25,7 +25,7 @@ func _calculate_steering(acceleration: GSAITargetAcceleration) -> void: # Callback for the proximity to call when finding neighbors. Adds `neighbor`'s position # to the center of mass of the group. -# tags: virtual +# @tags - virtual func _report_neighbor(neighbor: GSAISteeringAgent) -> bool: _center_of_mass += neighbor.position return true diff --git a/project/src/Behaviors/GSAIEvade.gd b/project/src/Behaviors/GSAIEvade.gd index c2d18a9..fe77e05 100644 --- a/project/src/Behaviors/GSAIEvade.gd +++ b/project/src/Behaviors/GSAIEvade.gd @@ -1,6 +1,6 @@ # Calculates acceleration to take an agent away from where a target agent is # moving. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAIEvade extends GSAIPursue diff --git a/project/src/Behaviors/GSAIFace.gd b/project/src/Behaviors/GSAIFace.gd index d4c9276..a2b84dd 100644 --- a/project/src/Behaviors/GSAIFace.gd +++ b/project/src/Behaviors/GSAIFace.gd @@ -1,6 +1,6 @@ # Calculates angular acceleration to rotate a target to face its target's # position. The behavior attemps to arrive with zero remaining angular velocity. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAIFace extends GSAIMatchOrientation diff --git a/project/src/Behaviors/GSAIFlee.gd b/project/src/Behaviors/GSAIFlee.gd index 0ae344c..a4c5ed9 100644 --- a/project/src/Behaviors/GSAIFlee.gd +++ b/project/src/Behaviors/GSAIFlee.gd @@ -1,5 +1,5 @@ # Calculates acceleration to take an agent directly away from a target agent. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAIFlee extends GSAISeek diff --git a/project/src/Behaviors/GSAIFollowPath.gd b/project/src/Behaviors/GSAIFollowPath.gd index 15a39e3..69bf536 100644 --- a/project/src/Behaviors/GSAIFollowPath.gd +++ b/project/src/Behaviors/GSAIFollowPath.gd @@ -1,5 +1,5 @@ # Produces a linear acceleration that moves the agent along the specified path. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAIFollowPath extends GSAIArrive diff --git a/project/src/Behaviors/GSAILookWhereYouGo.gd b/project/src/Behaviors/GSAILookWhereYouGo.gd index 0d85336..dfaee71 100644 --- a/project/src/Behaviors/GSAILookWhereYouGo.gd +++ b/project/src/Behaviors/GSAILookWhereYouGo.gd @@ -1,6 +1,6 @@ # Calculates an angular acceleration to match an agent's orientation to its # direction of travel. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAILookWhereYouGo extends GSAIMatchOrientation diff --git a/project/src/Behaviors/GSAIMatchOrientation.gd b/project/src/Behaviors/GSAIMatchOrientation.gd index 8683efe..2628731 100644 --- a/project/src/Behaviors/GSAIMatchOrientation.gd +++ b/project/src/Behaviors/GSAIMatchOrientation.gd @@ -1,7 +1,7 @@ # Calculates an angular acceleration to match an agent's orientation to that of # its target. Attempts to make the agent arrive with zero remaining angular # velocity. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAIMatchOrientation extends GSAISteeringBehavior diff --git a/project/src/Behaviors/GSAIPriority.gd b/project/src/Behaviors/GSAIPriority.gd index 6a5515b..35c9591 100644 --- a/project/src/Behaviors/GSAIPriority.gd +++ b/project/src/Behaviors/GSAIPriority.gd @@ -1,6 +1,6 @@ # Container for multiple behaviors that returns the result of the first child # behavior with non-zero acceleration. -# category: Combination behaviors +# @category - Combination behaviors class_name GSAIPriority extends GSAISteeringBehavior diff --git a/project/src/Behaviors/GSAIPursue.gd b/project/src/Behaviors/GSAIPursue.gd index df25403..2b56186 100644 --- a/project/src/Behaviors/GSAIPursue.gd +++ b/project/src/Behaviors/GSAIPursue.gd @@ -1,6 +1,6 @@ # Calculates an acceleration to make an agent intercept another based on the # target agent's movement. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAIPursue extends GSAISteeringBehavior diff --git a/project/src/Behaviors/GSAISeek.gd b/project/src/Behaviors/GSAISeek.gd index ed9a899..edcf5c0 100644 --- a/project/src/Behaviors/GSAISeek.gd +++ b/project/src/Behaviors/GSAISeek.gd @@ -1,6 +1,6 @@ # Calculates an acceleration to take an agent to a target agent's position # directly. -# category: Individual behaviors +# @category - Individual behaviors class_name GSAISeek extends GSAISteeringBehavior diff --git a/project/src/Behaviors/GSAISeparation.gd b/project/src/Behaviors/GSAISeparation.gd index 8ac4501..219a236 100644 --- a/project/src/Behaviors/GSAISeparation.gd +++ b/project/src/Behaviors/GSAISeparation.gd @@ -4,7 +4,7 @@ # The acceleration is an average based on all neighbors, multiplied by a # strength decreasing by the inverse square law in relation to distance, and it # accumulates. -# category: Group behaviors +# @category - Group behaviors class_name GSAISeparation extends GSAIGroupBehavior @@ -27,7 +27,7 @@ func _calculate_steering(acceleration: GSAITargetAcceleration) -> void: # Callback for the proximity to call when finding neighbors. Determines the amount of # acceleration that `neighbor` imposes based on its distance from the owner agent. -# tags: virtual +# @tags - virtual func _report_neighbor(neighbor: GSAISteeringAgent) -> bool: var to_agent := agent.position - neighbor.position diff --git a/project/src/GSAIAgentLocation.gd b/project/src/GSAIAgentLocation.gd index 2f34d41..8d118c6 100644 --- a/project/src/GSAIAgentLocation.gd +++ b/project/src/GSAIAgentLocation.gd @@ -1,5 +1,5 @@ # Represents an agent with only a location and an orientation. -# category: Base types +# @category - Base types class_name GSAIAgentLocation # The agent's position in space. diff --git a/project/src/GSAIGroupBehavior.gd b/project/src/GSAIGroupBehavior.gd index d6b1f05..a739819 100644 --- a/project/src/GSAIGroupBehavior.gd +++ b/project/src/GSAIGroupBehavior.gd @@ -1,5 +1,5 @@ # Base type for group-based steering behaviors. -# category: Base types +# @category - Base types class_name GSAIGroupBehavior extends GSAISteeringBehavior @@ -15,6 +15,6 @@ func _init(agent: GSAISteeringAgent, _proximity: GSAIProximity).(agent) -> void: # Internal callback for the behavior to define whether or not a member is # relevant -# tags: virtual +# @tags - virtual func _report_neighbor(_neighbor: GSAISteeringAgent) -> bool: return false diff --git a/project/src/GSAIPath.gd b/project/src/GSAIPath.gd index 0849f4c..93839b9 100644 --- a/project/src/GSAIPath.gd +++ b/project/src/GSAIPath.gd @@ -1,6 +1,6 @@ # Represents a path made up of Vector3 waypoints, split into segments path # follow behaviors can use. -# category: Base types +# @category - Base types class_name GSAIPath extends Reference diff --git a/project/src/GSAISteeringAgent.gd b/project/src/GSAISteeringAgent.gd index b4c97d1..0a56f99 100644 --- a/project/src/GSAISteeringAgent.gd +++ b/project/src/GSAISteeringAgent.gd @@ -2,7 +2,7 @@ # # It is the character's responsibility to keep this information up to date for # the steering toolkit to work correctly. -# category: Base types +# @category - Base types extends GSAIAgentLocation class_name GSAISteeringAgent diff --git a/project/src/GSAISteeringBehavior.gd b/project/src/GSAISteeringBehavior.gd index ede0aea..5ed50d6 100644 --- a/project/src/GSAISteeringBehavior.gd +++ b/project/src/GSAISteeringBehavior.gd @@ -5,7 +5,7 @@ # # The `calculate_steering` function is the entry point for all behaviors. # Individual steering behaviors encapsulate the steering logic. -# category: Base types +# @category - Base types class_name GSAISteeringBehavior # If `false`, all calculations return zero amounts of acceleration. diff --git a/project/src/GSAITargetAcceleration.gd b/project/src/GSAITargetAcceleration.gd index 581605c..0b5b052 100644 --- a/project/src/GSAITargetAcceleration.gd +++ b/project/src/GSAITargetAcceleration.gd @@ -1,6 +1,6 @@ # A desired linear and angular amount of acceleration requested by the steering # system. -# category: Base types +# @category - Base types class_name GSAITargetAcceleration # Linear acceleration diff --git a/project/src/GSAIUtils.gd b/project/src/GSAIUtils.gd index 524f63a..e1ae9fc 100644 --- a/project/src/GSAIUtils.gd +++ b/project/src/GSAIUtils.gd @@ -1,5 +1,5 @@ # Math and vector utility functions. -# Category: Utilities +# @Category - Utilities class_name GSAIUtils # Returns the `vector` with its length capped to `limit`. diff --git a/project/src/Proximities/GSAIInfiniteProximity.gd b/project/src/Proximities/GSAIInfiniteProximity.gd index 86632b0..9358812 100644 --- a/project/src/Proximities/GSAIInfiniteProximity.gd +++ b/project/src/Proximities/GSAIInfiniteProximity.gd @@ -1,6 +1,6 @@ # Determines any agent that is in the specified list as being neighbors with the # owner agent, regardless of distance. -# category: Proximities +# @category - Proximities extends GSAIProximity class_name GSAIInfiniteProximity @@ -13,7 +13,7 @@ func _init(agent: GSAISteeringAgent, agents: Array).(agent, agents) -> 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 +# @tags - virtual func _find_neighbors(callback: FuncRef) -> int: var neighbor_count := 0 var agent_count := agents.size() diff --git a/project/src/Proximities/GSAIProximity.gd b/project/src/Proximities/GSAIProximity.gd index 1eb8632..ceabf65 100644 --- a/project/src/Proximities/GSAIProximity.gd +++ b/project/src/Proximities/GSAIProximity.gd @@ -1,6 +1,6 @@ # Base container type that stores data to find the neighbors of an agent. -# category: Proximities -# tags: abstract +# @category - Proximities +# @tags - abstract extends Reference class_name GSAIProximity @@ -19,6 +19,6 @@ 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 +# @tags - virtual func _find_neighbors(_callback: FuncRef) -> int: return 0 diff --git a/project/src/Proximities/GSAIRadiusProximity.gd b/project/src/Proximities/GSAIRadiusProximity.gd index db3f79a..d4ba974 100644 --- a/project/src/Proximities/GSAIRadiusProximity.gd +++ b/project/src/Proximities/GSAIRadiusProximity.gd @@ -1,6 +1,6 @@ # Determines any agent that is in the specified list as being neighbors with the owner agent if # they lie within the specified radius. -# category: Proximities +# @category - Proximities extends GSAIProximity class_name GSAIRadiusProximity @@ -20,7 +20,7 @@ func _init(agent: GSAISteeringAgent, agents: Array, _radius: float).(agent, agen # # `_find_neighbors` calls `callback` for each agent in the `agents` array that lie within # the radius around the owning agent and adds one to the count if its `callback` returns true. -# tags: virtual +# @tags - virtual func _find_neighbors(callback: FuncRef) -> int: var agent_count := agents.size() var neighbor_count := 0