Skip to content

Commit db97354

Browse files
committed
Update add-easing-to-your-game-animations-with-phaser.mdx
1 parent 8ded7ef commit db97354

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

projects/add-easing-to-your-game-animations-with-phaser/add-easing-to-your-game-animations-with-phaser.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ We’ll do this in parts, since it gets a bit complex.
116116
```jsx
117117
function create() {
118118
const graphics = this.add.graphics();
119-
119+
120120
graphics.fillStyle(0x228B22, 1); // forest green
121121
graphics.fillRect(0, 450, 800, 50);
122122
}
@@ -130,8 +130,8 @@ After that, we set up a rectangle that acts as a platform for the player to stan
130130
- `0x228B22` is written in a special format that the graphics object can understand. The `#` prefix we associate with hex codes is simply replaced by the `0x` prefix.
131131
- `1` makes the rectangle fully opaque.
132132
- `fillRect(0, 450, 800, 50)` draws a rectangle.
133-
- `x = 0, y = 450` is the top-left corner of the rectangle.
134-
- `width = 800, height = 50` fills across the width of the screen, 50 pixels tall.
133+
- `0, 450` is the `x, y` coordinates of the top-left corner of the rectangle.
134+
- `800, 50` is the `width, height` of the rectangle.
135135

136136
Next, we can create the walking animation.
137137

0 commit comments

Comments
 (0)