Add missing virtual tag

This commit is contained in:
Francois Belair 2020-01-30 18:24:47 -05:00
parent 15ee27387a
commit 3cf2089ada
2 changed files with 4 additions and 3 deletions

View File

@ -42,6 +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
func _report_neighbor(neighbor: GSTSteeringAgent) -> bool:
var relative_position := neighbor.position - agent.position
var relative_velocity := neighbor.linear_velocity - agent.linear_velocity

View File

@ -20,7 +20,7 @@ As a short overview, a character is represented by a steering agent; it stores i
## Manual ##
The various behaviors and types in the toolkit have been gathered into a [Reference](https://github.com/GDQuest/godot-steering-toolkit/wiki/Manual-API-reference-draft) manual.
The various behaviors and types in the toolkit have been gathered into a [Reference](https://github.com/GDQuest/godot-steering-toolkit/wiki) manual.
## Example usage ##
@ -30,6 +30,8 @@ The goal of this class is to show how an agent can chase a player and predict wh
Our game will be in 2D and assumed to be a top-down spaceship game.
You can see the demo in action by running the `demos/QuickStartDemo.tscn` scene in Godot. There are other demos there that showcase the various behaviors, and the behavior parameters can be tweaked and changed by changing the demo's root node's parameters.
```ruby
extends KinematicBody2D
@ -206,5 +208,3 @@ func damage(amount: int) -> void:
queue_free()
```
You can see the demo in action by running the `demos/QuickStartDemo.tscn` scene in Godot. There are other demos there that showcase the various behaviors, and the behavior parameters can be tweaked and changed by changing the demo's root node's parameters.