From 98dde4e3ec1b3b0544344374dd1b0cbe42971719 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 21 Jul 2025 09:02:45 +0000 Subject: [PATCH] Actualiser Home --- Home.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Home.md b/Home.md index 51dca95..c5c39b9 100644 --- a/Home.md +++ b/Home.md @@ -25,8 +25,18 @@ We can keep track of metadata constants in a separate class to not mess things u ![graph](img/module_example.webp) +### RefCounted vs Objects > **Note** By not declaring an extent to a script file, it will automatically extend from [RefCounted](https://docs.godotengine.org/en/stable/classes/class_refcounted.html) type +RefCounted delete itself when not used, opposed to the Object that stay until `free()` or `queue_free()` + +> **Game example** +> A sound created by a monster +> `Sound -> Resource -> RefCounted` +> When the sound is no longer in use it's going to automatically be freed. + +For performance purpose, we will use a lot of RefCounted script, so that every time it's not used, it will be freed. + ## Main classes