diff --git a/doc/bgm.md b/doc/bgm.md index 9ef54ed02..3d0b4d501 100644 --- a/doc/bgm.md +++ b/doc/bgm.md @@ -1,6 +1,6 @@ # Looping Background Music -The `Bgm` class with the management of loooping background music tracks with regards to application (or game) lifecycle state changes. +The `Bgm` class with the management of looping background music tracks with regards to application (or game) lifecycle state changes. When the application is paused, terminated, or sent to background, `Bgm` will automatically pause the currently playing music track. Similarly, when the application is resumed, `Bgm` will resume the background music. Manual pause and resume is also supported. diff --git a/doc/components.md b/doc/components.md index c644ffdc4..721bd1d11 100644 --- a/doc/components.md +++ b/doc/components.md @@ -201,9 +201,9 @@ A example of how to use the API can be found [here](/doc/examples/tiled). A Nine Tile Box is a rectangle drawn using a grid sprite. -The grid sprite is a 3x3 grid and with 9 blocks, representing the 4 courners, the 4 sides and the middle. +The grid sprite is a 3x3 grid and with 9 blocks, representing the 4 corners, the 4 sides and the middle. -The corners are drawn at the same size, the sides are streched on the side direction and the middle is expanded both ways. +The corners are drawn at the same size, the sides are stretched on the side direction and the middle is expanded both ways. Using this, you can get a box/rectangle that expands well to any sizes. This is useful for making panels, dialogs, borders. diff --git a/doc/input.md b/doc/input.md index bae77885a..a64ed577d 100644 --- a/doc/input.md +++ b/doc/input.md @@ -67,7 +67,7 @@ All of these methods are basically a mirror from the callbacks available on the ```dart class MyGame extends Game with TapDetector { - // Other methods ommited + // Other methods omitted @override void onTapDown(TapDownDetails details) { @@ -123,7 +123,7 @@ class TapableComponent extends PositionComponent with Tapable { Flame provides a simple way to access Flutter's features regarding accessing Keyboard input events. -To use it just add the `KeyboardEvents` mixin to your game class. By doing so you will need to implement the `onKeyEvent` method, this method is called everytime a keyboard event happens, and it receives an instance of the Flutter class `RawKeyEvent`, which can be used to get information about the event, like if it was a key down or key up event, the pressed key and etc. +To use it just add the `KeyboardEvents` mixin to your game class. By doing so you will need to implement the `onKeyEvent` method, this method is called every time a keyboard event happens, and it receives an instance of the Flutter class `RawKeyEvent`, which can be used to get information about the event, like if it was a key down or key up event, the pressed key and etc. Minimal example: diff --git a/doc/particles.md b/doc/particles.md index b866db9ce..28cdcdae3 100644 --- a/doc/particles.md +++ b/doc/particles.md @@ -23,7 +23,7 @@ When using `Particle` with custom `Game` implementation, please ensure that `Par Main approaches to implement desired particle effects: * Composition of existing behaviors -* Use behavior chaining (just a syntaxic sugar over first one) +* Use behavior chaining (just a syntactic sugar over first one) * Using `ComputedParticle` Composition works in a similar fashion to those of Flutter widgets by defining the effect from top to bottom. Chaining allows to express same composition trees more fluently by defining behaviors from bottom to top. Computed particles in their turn fully delegate implementation of the behavior to your code. Any of the approaches, though, could be used in conjunction with existing behaviors, where needed. @@ -101,7 +101,7 @@ You can find more examples of using different built-int particles in various com ## Lifecycle -Behavior common to all `Particle`s is that all of them accept `lifespan` parameter. This value is used to make `ParticleCoponent` self-destoy, once its internal `Particle` has reached the end of its life. Time within the `Particle` itself is tracked using the Flame `Timer`. It could be configured with `double`, representing seconds (with microsecond precision)by passing it into the corresponding `Particle` constructor. +Behavior common to all `Particle`s is that all of them accept `lifespan` parameter. This value is used to make `ParticleCoponent` self-destroy, once its internal `Particle` has reached the end of its life. Time within the `Particle` itself is tracked using the Flame `Timer`. It could be configured with `double`, representing seconds (with microsecond precision)by passing it into the corresponding `Particle` constructor. ```dart Particle(lifespan: .2); // will live for 200ms @@ -357,7 +357,7 @@ game.add( ## Nesting behavior Flame's implementation of particles follows same pattern of extreme composition as Flutter widgets. That -is achieved by incapsulating small pieces of behavior in every of particles and then nesting these behaviors together to achieve desired visual effect. +is achieved by encapsulating small pieces of behavior in every of particles and then nesting these behaviors together to achieve desired visual effect. Two entities allowing `Particle` to nest each other are: `SingleChildParticle` mixin and `ComposedParticle` class. diff --git a/doc/widgets.md b/doc/widgets.md index 6c181c02a..7d378d502 100644 --- a/doc/widgets.md +++ b/doc/widgets.md @@ -10,9 +10,9 @@ You can also see all the widgets showcased inside a [Dashbook](https://github.co A Nine Tile Box is a rectangle drawn using a grid sprite. -The grid sprite is a 3x3 grid and with 9 blocks, representing the 4 courners, the 4 sides and the middle. +The grid sprite is a 3x3 grid and with 9 blocks, representing the 4 corners, the 4 sides and the middle. -The corners are drawn at the same size, the sides are streched on the side direction and the middle is expanded both ways. +The corners are drawn at the same size, the sides are stretched on the side direction and the middle is expanded both ways. The `NineTileBox` widget implements a Container using that standard. This pattern is also implemented in game by the `NineTileBoxComponent` where you can use this same feature, but directly into the game Canvas, to know more about this, check the component docs [here](doc/components.md#nine-tile-box-component).