Actualiser Home
parent
bc21a68a5e
commit
98dde4e3ec
1 changed files with 10 additions and 0 deletions
10
Home.md
10
Home.md
|
@ -25,8 +25,18 @@ We can keep track of metadata constants in a separate class to not mess things u
|
|||
|
||||

|
||||
|
||||
### 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
|
||||
|
|
Loading…
Reference in a new issue