From c5d931c3fbbad162b6c20e6c4b69ad549a829af3 Mon Sep 17 00:00:00 2001 From: Kyle Starr Date: Thu, 25 Jan 2024 21:03:17 -0800 Subject: [PATCH 1/3] Moving disclaimer comments inline Moving disclaimer comments inline to better specify which boolean statement is being referred to. --- getting_started/first_2d_game/03.coding_the_player.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/getting_started/first_2d_game/03.coding_the_player.rst b/getting_started/first_2d_game/03.coding_the_player.rst index a94d16516..8c1d3c6e3 100644 --- a/getting_started/first_2d_game/03.coding_the_player.rst +++ b/getting_started/first_2d_game/03.coding_the_player.rst @@ -275,8 +275,7 @@ movement. Let's place this code at the end of the ``_process()`` function: if velocity.x != 0: $AnimatedSprite2D.animation = "walk" $AnimatedSprite2D.flip_v = false - # See the note below about boolean assignment. - $AnimatedSprite2D.flip_h = velocity.x < 0 + $AnimatedSprite2D.flip_h = velocity.x < 0 ## See the note below about this boolean assignment. elif velocity.y != 0: $AnimatedSprite2D.animation = "up" $AnimatedSprite2D.flip_v = velocity.y > 0 @@ -287,8 +286,7 @@ movement. Let's place this code at the end of the ``_process()`` function: { animatedSprite2D.Animation = "walk"; animatedSprite2D.FlipV = false; - // See the note below about boolean assignment. - animatedSprite2D.FlipH = velocity.X < 0; + animatedSprite2D.FlipH = velocity.X < 0; // See the note below about this boolean assignment. } else if (velocity.Y != 0) { From af66da052fb276ad2d5182888d71fa99515abc3b Mon Sep 17 00:00:00 2001 From: Kyle Starr Date: Fri, 26 Jan 2024 21:01:09 -0800 Subject: [PATCH 2/3] 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. --- getting_started/first_2d_game/03.coding_the_player.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/getting_started/first_2d_game/03.coding_the_player.rst b/getting_started/first_2d_game/03.coding_the_player.rst index 8c1d3c6e3..e9ebba0dd 100644 --- a/getting_started/first_2d_game/03.coding_the_player.rst +++ b/getting_started/first_2d_game/03.coding_the_player.rst @@ -275,7 +275,8 @@ movement. Let's place this code at the end of the ``_process()`` function: if velocity.x != 0: $AnimatedSprite2D.animation = "walk" $AnimatedSprite2D.flip_v = false - $AnimatedSprite2D.flip_h = velocity.x < 0 ## See the note below about this boolean assignment. + ## See the note below about the following boolean assignment. + $AnimatedSprite2D.flip_h = velocity.x < 0 elif velocity.y != 0: $AnimatedSprite2D.animation = "up" $AnimatedSprite2D.flip_v = velocity.y > 0 @@ -286,7 +287,8 @@ movement. Let's place this code at the end of the ``_process()`` function: { animatedSprite2D.Animation = "walk"; animatedSprite2D.FlipV = false; - animatedSprite2D.FlipH = velocity.X < 0; // See the note below about this boolean assignment. + // See the note below about the following boolean assignment. + animatedSprite2D.FlipH = velocity.X < 0; } else if (velocity.Y != 0) { From 24fb0e2f0ddf2f32214c9f6a8b42cca3e94fbb8b Mon Sep 17 00:00:00 2001 From: Kyle Starr Date: Wed, 28 Feb 2024 07:28:27 -0800 Subject: [PATCH 3/3] Removing one comment hash for style Co-authored-by: Matthew --- getting_started/first_2d_game/03.coding_the_player.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getting_started/first_2d_game/03.coding_the_player.rst b/getting_started/first_2d_game/03.coding_the_player.rst index e9ebba0dd..fea13eba9 100644 --- a/getting_started/first_2d_game/03.coding_the_player.rst +++ b/getting_started/first_2d_game/03.coding_the_player.rst @@ -275,7 +275,7 @@ movement. Let's place this code at the end of the ``_process()`` function: if velocity.x != 0: $AnimatedSprite2D.animation = "walk" $AnimatedSprite2D.flip_v = false - ## See the note below about the following boolean assignment. + # See the note below about the following boolean assignment. $AnimatedSprite2D.flip_h = velocity.x < 0 elif velocity.y != 0: $AnimatedSprite2D.animation = "up"