mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2025-01-09 22:09:37 +01:00
Add tags:
moniker for virtual functions
Works with the docs maker accordingly
This commit is contained in:
parent
3cf2089ada
commit
ae3c3569ee
2238
project/reference.json
Normal file
2238
project/reference.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user