Skip to content

Commit

Permalink
Added line to remind reader to add the player file into the lib file …
Browse files Browse the repository at this point in the history
…if they are not writing it there already.
  • Loading branch information
Relu committed Feb 6, 2025
1 parent 3448fa3 commit 9b22878
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/intro/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,9 @@ Rust does not natively support inheritance, but the gdext API emulates it to a c

### Class declaration

In this example, we declare a class called `Player`, which inherits [`Sprite2D`][api-class-sprite2d] (a node type):
In this example, we declare a class called `Player`, which inherits Sprite2D (a node type).
This can be either defined in `lib.rs` or in a separate file `player.rs`.
In case you go for the latter, don't forget to declare mod player; in your lib.rs file.

```rust
use godot::prelude::*;
Expand Down

0 comments on commit 9b22878

Please sign in to comment.