Class object being referenced globally instead of privately

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Inces

Hello,

I created aura class object, different elemental auras inherit from it. Aura class has 2 variables : radius and shape reference. Somehow, when a new object with any aura enters the scene, all already existing auras have their shapes and radius modified just like that new object on his private _ready function.

Is there some mechanism with inheritance I don’t understand ? Why do all objects inheriting from certain class object change, when I set a variable in private function of only one of them ?

:bust_in_silhouette: Reply From: AlexTheRegent

Does variables with radius and shape changed in objects or only visual representation?
Also there is no private functions in gdscript. All functions are publicly accessible.

radius remained individual for all objects, only shape changed and behaved like it was globally assessed. Is it something with shape2d " set_extents " ?

Inces | 2021-01-10 17:33