Skip to content

Commit af66da0

Browse files
authored
Update 03.coding_the_player.rst
Accepting feedback that inline comment expands the block unnecessarily. Perhaps the better edit here is to explicitly state that the comment is about the following boolean statement rather than the prior.
1 parent c5d931c commit af66da0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

getting_started/first_2d_game/03.coding_the_player.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ movement. Let's place this code at the end of the ``_process()`` function:
275275
if velocity.x != 0:
276276
$AnimatedSprite2D.animation = "walk"
277277
$AnimatedSprite2D.flip_v = false
278-
$AnimatedSprite2D.flip_h = velocity.x < 0 ## See the note below about this boolean assignment.
278+
## See the note below about the following boolean assignment.
279+
$AnimatedSprite2D.flip_h = velocity.x < 0
279280
elif velocity.y != 0:
280281
$AnimatedSprite2D.animation = "up"
281282
$AnimatedSprite2D.flip_v = velocity.y > 0
@@ -286,7 +287,8 @@ movement. Let's place this code at the end of the ``_process()`` function:
286287
{
287288
animatedSprite2D.Animation = "walk";
288289
animatedSprite2D.FlipV = false;
289-
animatedSprite2D.FlipH = velocity.X < 0; // See the note below about this boolean assignment.
290+
// See the note below about the following boolean assignment.
291+
animatedSprite2D.FlipH = velocity.X < 0;
290292
}
291293
else if (velocity.Y != 0)
292294
{

0 commit comments

Comments
 (0)