mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Change C++ animation name for consistency in Your first 2D game (#5938)
This commit is contained in:
committed by
Hugo Locurcio
parent
934fe7f3b7
commit
8f9a5db8ff
@@ -361,7 +361,7 @@ movement. Let's place this code at the end of the ``_process()`` function:
|
||||
.. code-tab:: cpp
|
||||
|
||||
if (velocity.x != 0) {
|
||||
_animated_sprite->set_animation("right");
|
||||
_animated_sprite->set_animation("walk");
|
||||
_animated_sprite->set_flip_v(false);
|
||||
// See the note below about boolean assignment.
|
||||
_animated_sprite->set_flip_h(velocity.x < 0);
|
||||
|
||||
Reference in New Issue
Block a user