Commit Graph

14 Commits

Author SHA1 Message Date
Francois Belair
dc9a57e7fd Append _ to apply_steering and fix yield on ready 2020-02-07 09:56:03 -05:00
Răzvan C. Rădulescu
1baed58659 Review smart agents
I made minimal changes, mostly cosmetic like so:

- rename KinematicMovementType to MovementType since
  GSTKinematicBody2DAgent.KinematicMovementType.COLLIDE for example is
  really more than a mouthful with repeated Kinematic in the name
- add optional movement_type parameter to the constructor, otherwise
  we'd be forced to construct the object and then specify as an
  aditional step the type of movement if we want something else than the
  default
- rewrote the constructor to yield on ready and removed _on_body_ready
- renamed _apply_steering to apply_steering as this is a public method
- renamed _on_SceneTree_frame to _on_SceneTree_physics_frame
2020-02-07 12:29:45 +02:00
Francois Belair
2ae06d3da3 Split agent types into specialized classes 2020-02-06 16:30:53 -05:00
Francois Belair
85784791ec Add and have most demos use specialized agents
The agents auto-update themselves and can calculate their velocities.
This keeps the user from having to create an update_agent function.
It can also save the user from having to keep track of and update
velocities at all by using the provided `apply_steering` method.

Closes #15, closes #16
2020-02-06 16:00:41 -05:00
Francois Belair
57f3c4a24a Make calculate_acceleration return void
This makes the code more in line with GDQuest gdscript guidelines about
 not both transforming state and returning a value.
2020-02-06 14:46:21 -05:00
Francois Belair
52ca9ade74 Make window always on top, add missing background 2020-02-04 12:35:46 -05:00
Răzvan C. Rădulescu
4fceb866f7 Use beginner 2d platformer visual style 2020-02-03 18:07:43 +02:00
Nathan Lovato
0586878fcf Fix the style of booleans and virtual functions in the API
Made booleans start with a prefix, e.g. is_open
Added a leading underscore to two virtual functions
Added VIRTUAL comment above several virtual functions
Renamed accel -> acceleration in a function
2020-01-29 15:53:57 -06:00
Francois Belair
e95e3bf386
Quick start and reference guides (#7)
Add quickstart guide and quickstart demo

Authored by Razoric and edited by Nathan and Johnny.
The purpose of the guide is simply to give an overview of what the
behaviors are there for, and a quick look at how to actually make use
of them in the basis of this toolkit, with some explanatory comments.
The actual user's manual will be built out of the API reference.
2020-01-27 11:39:06 -05:00
Francois Belair
8228694713 Refactor var names for consistency aka min/max 2020-01-22 11:55:49 -05:00
Francois Belair
fe00d231b8 Fix typo in seek instructions 2020-01-17 09:17:06 -05:00
Francois Belair
6e6f27505c Fix init time setters and export Follow variables
The use of `not is_inside_tree()` before setting the setting class' value
meant that the starting values would always be the default. Moving the
value setting before checking for tree readiness fixes the issue.
2020-01-16 12:31:02 -05:00
Răzvan C. Rădulescu
1f44bace3e Improve and review the available demos
- simplify code when possible
- add a simple info panel
- adhere to the "new" gdscript guidelines
2020-01-16 17:04:27 +02:00
Răzvan C. Rădulescu
1a37b2bee0 Update project to follow GDScript guidelines closer
Used `var variable := 0.0` as discussed in the Godot issue, instead of
`var variable: = 0.0`.

Mostly these are minor/cosmetic changes, but I've also reorganized the
folder structure (naming of folders) to reflect our guidelines, plus
made some minor changes to the demo codes. Still work in progress.
2020-01-16 10:44:44 +02:00