Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 2d_sprite_animation.rst #9322

Merged
merged 1 commit into from May 14, 2024
Merged

Conversation

Charl-pena
Copy link
Contributor

Corrected the C# code from the example in the 'Controlling the animation' section, fixing the class name used by the generic method GetNode(), as well as the string parameter.

Old:

public partial class Character : CharacterBody2D
{
    private AnimatedSprite2D _animatedSprite;

    public override void _Ready()
    {
        _animatedSprite = GetNode<AnimatedSprite>("AnimatedSprite");
    }
  ...
}

New:

public partial class Character : CharacterBody2D
{
    private AnimatedSprite2D _animatedSprite;

    public override void _Ready()
    {
        _animatedSprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");
    }
  ...
}

Corrected the C# code from the example in the 'Controlling the animation' section, fixing the class name used by the generic method GetNode<T>(), as well as the string parameter.
@skyace65 skyace65 added bug topic:dotnet area:manual Issues and PRs related to the Manual/Tutorials section of the documentation labels May 14, 2024
@skyace65 skyace65 merged commit 0c78d9f into godotengine:master May 14, 2024
1 check passed
@skyace65
Copy link
Contributor

Thanks! And congrats on your first merged PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:manual Issues and PRs related to the Manual/Tutorials section of the documentation bug topic:dotnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants