Skip to content

Commit 6b18b17

Browse files
author
Relu
committed
Added line to remind player to add the player file into the lib file if they are not writing it there already.
1 parent 3448fa3 commit 6b18b17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/intro/hello-world.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ Rust does not natively support inheritance, but the gdext API emulates it to a c
264264

265265
### Class declaration
266266

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

269271
```rust
270272
use godot::prelude::*;

0 commit comments

Comments
 (0)