File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
getting_started/first_2d_game Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -275,8 +275,7 @@ 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- # See the note below about boolean assignment.
279- $AnimatedSprite2D.flip_h = velocity.x < 0
278+ $AnimatedSprite2D.flip_h = velocity.x < 0 ## See the note below about this boolean assignment.
280279 elif velocity.y != 0:
281280 $AnimatedSprite2D.animation = "up"
282281 $AnimatedSprite2D.flip_v = velocity.y > 0
@@ -287,8 +286,7 @@ movement. Let's place this code at the end of the ``_process()`` function:
287286 {
288287 animatedSprite2D.Animation = "walk";
289288 animatedSprite2D.FlipV = false;
290- // See the note below about boolean assignment.
291- animatedSprite2D.FlipH = velocity.X < 0;
289+ animatedSprite2D.FlipH = velocity.X < 0; // See the note below about this boolean assignment.
292290 }
293291 else if (velocity.Y != 0)
294292 {
You can’t perform that action at this time.
0 commit comments