Skip to content

Commit

Permalink
chore: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
derkork committed Sep 27, 2023
1 parent b2f557c commit 748a100
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.5.0] - 2023-09-27
### Added
- Compound states now have two additional signals `on_child_state_entered` and `on_child_state_exited` which allow running common code that should run whenever a child state of the compound state is entered or exited. This is for example useful for resetting some internal state. A big thanks goes out to [Ian Sly](https://github.com/uzkbwza) for sending a PR with this feature.


## [0.4.5] - 2023-09-13
### Fixed
- Fixed double jump animation in platformer demo looping endlessly in Godot 4.1 ([#33](https://github.com/derkork/godot-statecharts/issues/33)).
Expand Down
11 changes: 9 additions & 2 deletions manual/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ States are the building blocks from which you build your state charts. A state c
- `state_input(input_event)` - called when input is received while the state is active. This is useful to limit input to certain states.
- `state_unhandled_input(input_event)` - called when unhandled input is received while the state is active. Again this is useful to limit input to certain states.



#### Atomic states

<img src="../addons/godot_state_charts/atomic_state.svg" width="32" height="32" align="left"> Atomic states are the most basic type of state. They cannot have child states. Atomic states have no additional properties.
Expand All @@ -80,6 +82,11 @@ States are the building blocks from which you build your state charts. A state c

<img src="compound_state.png" width="400" alt="Compound state properties">

Compound states have two signals in addition to the signals that all states have, which allow you to run common code whenever a child state of the compound state is entered/exited:

- `child_state_entered()` - called when any child state is entered.
- `child_state_exited()` - called when any child state is exited.

#### Parallel states

<img src="../addons/godot_state_charts/parallel_state.svg" width="32" height="32" align="left"> Parallel states are similar to compound states in that they can have multiple child states. However, all child states of a parallel state are active at the same time when the parallel state is active. They allow you to model multiple states which are independent of each other. As such they are a great tool for avoiding combinatorial state explosion that you can get with simple state machines. Parallel states have no additional properties.
Expand All @@ -98,7 +105,7 @@ To use a history state, set up a transition that transitions directly to the his

#### Animation tree states

_Note: this feature is currently experimental and may change or be replaced in the future._
> ⚠️ **Note**: this feature is currently experimental and may change or be replaced in the future.
<img src="../addons/godot_state_charts/animation_tree_state.svg" width="32" height="32" align="left"> Animation tree states are a variation of atomic states. They can be linked to an animation tree. When an animation tree state is activated it will ask the animation tree to travel to the same state (the animation tree state and the state inside the animation tree should have the same name). This can be used to control animation trees with the same state chart events that you use to control your game logic. Animation tree states have the following properties:

Expand All @@ -114,7 +121,7 @@ Animation tree states are usually independent of the rest of the states, so it i

#### Animation player states

_Note: this feature is currently experimental and may change or be replaced in the future._
> ⚠️ **Note**: this feature is currently experimental and may change or be replaced in the future.
<img src="../addons/godot_state_charts/animation_player_state.svg" width="32" height="32" align="left"> Animation player states are similar to animation tree states. They can be linked to an animation player. When an animation player state is activated it will ask the animation player to play the same animation (the animation player state and the animation inside the animation player should have the same name). This can be used to control animation players with the same state chart events that you use to control your game logic. Animation player states have the following properties:

Expand Down

0 comments on commit 748a100

Please sign in to comment.