Add tags: moniker for virtual functions

Works with the docs maker accordingly
This commit is contained in:
Francois Belair 2020-02-02 12:48:58 -05:00
parent 3cf2089ada
commit ae3c3569ee
8 changed files with 2245 additions and 7 deletions

2238
project/reference.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -42,7 +42,7 @@ func _calculate_steering(acceleration: GSTTargetAcceleration) -> GSTTargetAccele
# 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.
# virtual
# tags: virtual
func _report_neighbor(neighbor: GSTSteeringAgent) -> bool:
var relative_position := neighbor.position - agent.position
var relative_velocity := neighbor.linear_velocity - agent.linear_velocity

View File

@ -23,7 +23,7 @@ func _calculate_steering(acceleration: GSTTargetAcceleration) -> GSTTargetAccele
# Callback for the proximity to call when finding neighbors. Adds `neighbor`'s position
# to the center of mass of the group.
# virtual
# tags: virtual
func _report_neighbor(neighbor: GSTSteeringAgent) -> bool:
_center_of_mass += neighbor.position
return true

View File

@ -27,7 +27,7 @@ func _calculate_steering(acceleration: GSTTargetAcceleration) -> GSTTargetAccele
# 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.
# virtual
# tags: virtual
func _report_neighbor(neighbor: GSTSteeringAgent) -> bool:
var to_agent := agent.position - neighbor.position

View File

@ -15,6 +15,6 @@ func _init(agent: GSTSteeringAgent, proximity: GSTProximity).(agent) -> void:
# Internal callback for the behavior to define whether or not a member is
# relevant
# virtual
# tags: virtual
func _report_neighbor(neighbor: GSTSteeringAgent) -> bool:
return false

View File

@ -12,7 +12,7 @@ func _init(agent: GSTSteeringAgent, 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.
# virtual
# tags: virtual
func _find_neighbors(callback: FuncRef) -> int:
var neighbor_count := 0
var agent_count := agents.size()

View File

@ -18,6 +18,6 @@ func _init(agent: GSTSteeringAgent, 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.
# virtual
# tags: virtual
func _find_neighbors(callback: FuncRef) -> int:
return 0

View File

@ -20,7 +20,7 @@ func _init(agent: GSTSteeringAgent, agents: Array, radius: float).(agent, agents
#
# `_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.
# virtual
# tags: virtual
func _find_neighbors(callback: FuncRef) -> int:
var agent_count := agents.size()
var neighbor_count := 0