From 9b228786f26cb946922121a6d9b1491ebb95eb75 Mon Sep 17 00:00:00 2001 From: Relu <> Date: Sat, 18 Jan 2025 01:50:54 +0100 Subject: [PATCH 1/3] Added line to remind reader to add the player file into the lib file if they are not writing it there already. --- src/intro/hello-world.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intro/hello-world.md b/src/intro/hello-world.md index a59a36f..48004ce 100644 --- a/src/intro/hello-world.md +++ b/src/intro/hello-world.md @@ -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::*; From eb43190dfb2566b0e245e392a63e7d6aab59b424 Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Thu, 6 Feb 2025 23:26:06 +0100 Subject: [PATCH 2/3] Update src/intro/hello-world.md --- src/intro/hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intro/hello-world.md b/src/intro/hello-world.md index 48004ce..2dcf366 100644 --- a/src/intro/hello-world.md +++ b/src/intro/hello-world.md @@ -266,7 +266,7 @@ Rust does not natively support inheritance, but the gdext API emulates it to a c 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. +In case you go for the latter, don't forget to declare `mod player;` in your `lib.rs` file. ```rust use godot::prelude::*; From 8b33fb0688366ef080078b6ae496ce19dd27642b Mon Sep 17 00:00:00 2001 From: Jan Haller Date: Thu, 6 Feb 2025 23:26:56 +0100 Subject: [PATCH 3/3] Update src/intro/hello-world.md --- src/intro/hello-world.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intro/hello-world.md b/src/intro/hello-world.md index 2dcf366..2474596 100644 --- a/src/intro/hello-world.md +++ b/src/intro/hello-world.md @@ -264,7 +264,7 @@ 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 (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.