Skip to content

Commit

Permalink
docs: Fix actual typos that made into our dictionary (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
luanpotter committed Jan 28, 2023
1 parent 00b0dbe commit 343b845
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 19 deletions.
1 change: 0 additions & 1 deletion .github/.cspell/flame_dictionary.txt
Expand Up @@ -7,7 +7,6 @@ Dashbook
Fireslime
Hermione
Kawabunga
Kinect
Klingsbo
Lukas
Nakama
Expand Down
2 changes: 0 additions & 2 deletions .github/.cspell/gamedev_dictionary.txt
Expand Up @@ -94,7 +94,6 @@ prerender
prerendered
pressable
proxying
pubdev
pubspec
queryable
raycast
Expand All @@ -118,7 +117,6 @@ respawn
respawned
rrect
rrects
rsts
scos
serializable
socio
Expand Down
2 changes: 1 addition & 1 deletion doc/bridge_packages/flame_svg/svg.md
Expand Up @@ -9,7 +9,7 @@ Svg support is provided by the `flame_svg` bridge package, be sure to put it in
to use it.

If you want to know more about the installation visit
[flame_svg on pubdev](https://pub.dev/packages/flame_svg/install).
[flame_svg on pub.dev](https://pub.dev/packages/flame_svg/install).


## How to use flame_svg
Expand Down
2 changes: 1 addition & 1 deletion doc/flame/effects.md
Expand Up @@ -771,7 +771,7 @@ following effects qualify: [`MoveByEffect`](#movebyeffect), [`MoveToEffect`](#mo
[`RotateEffect.to`](#rotateeffectto).

The parameter `speed` is in units per second, where the notion of a "unit" depends on the target
effect. For example, for move effects, they refer to the distance travelled; for rotation effects
effect. For example, for move effects, they refer to the distance traveled; for rotation effects
the units are radians.

```dart
Expand Down
2 changes: 1 addition & 1 deletion doc/other_modules/jenny/language/commands/declare.md
Expand Up @@ -79,7 +79,7 @@ the same as `TYPE`, and will throw a compile-time error otherwise.
<<declare $been_to_hell = false>>
<<declare $name as String>>
<<declare $distanceTravelled as Number>>
<<declare $distanceTraveled as Number>>
<<declare $birthDay = randomRange(1, 365) as Number>>
<<declare $vulgarity = GetObscenitySetting() as Bool>>
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorials/platformer/step_3.md
Expand Up @@ -422,7 +422,7 @@ with a `passive` `CollisionType`. Collisions will be explained more in a later
#### Display the Platform

In our `loadGameSegments` method from earlier, we will need to add the call to add our block. We
will need to define `gridPosition` and `xOffset` to be passed in. `gridPostion` will be a
will need to define `gridPosition` and `xOffset` to be passed in. `gridPosition` will be a
`Vector2` and `xOffset` is a double as that will be used to calculate the x-axis offset for
the block in a `Vector2`. So add the following to your `loadGameSegments` method:

Expand Down
8 changes: 4 additions & 4 deletions examples/games/trex/lib/trex_game.dart
Expand Up @@ -42,7 +42,7 @@ class TRexGame extends FlameGame
String scoreString(int score) => score.toString().padLeft(5, '0');

/// Used for score calculation
double _distanceTravelled = 0;
double _distanceTraveled = 0;

@override
Future<void> onLoad() async {
Expand Down Expand Up @@ -128,7 +128,7 @@ class TRexGame extends FlameGame
_highscore = score;
}
score = 0;
_distanceTravelled = 0;
_distanceTraveled = 0;
}

@override
Expand All @@ -140,8 +140,8 @@ class TRexGame extends FlameGame

if (isPlaying) {
timePlaying += dt;
_distanceTravelled += dt * currentSpeed;
score = _distanceTravelled ~/ 50;
_distanceTraveled += dt * currentSpeed;
score = _distanceTraveled ~/ 50;

if (currentSpeed < maxSpeed) {
currentSpeed += acceleration * dt;
Expand Down
Expand Up @@ -51,28 +51,28 @@ class SpriteFontTextFormatter extends TextFormatter {
@override
TextElement format(String text) {
var rects = Float32List(text.length * 4);
var rsts = Float32List(text.length * 4);
var transforms = Float32List(text.length * 4);
var j = 0;
var x0 = 0.0;
for (final glyph in font.textToGlyphs(text)) {
rects[j + 0] = glyph.srcLeft;
rects[j + 1] = glyph.srcTop;
rects[j + 2] = glyph.srcRight;
rects[j + 3] = glyph.srcBottom;
rsts[j + 0] = scale;
rsts[j + 1] = 0;
rsts[j + 2] = x0 + (glyph.srcLeft - glyph.left) * scale;
rsts[j + 3] = (glyph.srcTop - glyph.top - font.ascent) * scale;
transforms[j + 0] = scale;
transforms[j + 1] = 0;
transforms[j + 2] = x0 + (glyph.srcLeft - glyph.left) * scale;
transforms[j + 3] = (glyph.srcTop - glyph.top - font.ascent) * scale;
j += 4;
x0 += glyph.width * scale + letterSpacing;
}
if (j < text.length * 4) {
rects = rects.sublist(0, j);
rsts = rsts.sublist(0, j);
transforms = transforms.sublist(0, j);
}
return SpriteFontTextElement(
source: font.source,
transforms: rsts,
transforms: transforms,
rects: rects,
paint: paint,
metrics: LineMetrics(
Expand Down
Expand Up @@ -19,7 +19,7 @@ class Inventory extends StatelessWidget {
String _mapWeaponName(Weapon weapon) {
switch (weapon) {
case Weapon.bullet:
return 'Kinect';
return 'Kinetic';
case Weapon.laser:
return 'Laser';
case Weapon.plasma:
Expand Down

0 comments on commit 343b845

Please sign in to comment.