Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | F0remNKB |
i have an instance
MAGIC_BLAST = loader-> load ("res: //Nodes/Player/Magic/Magic_Blast.tscn", "PackedScene");
Node2D * magic_blast = cast_to <Node2D> (MAGIC_BLAST-> instance ());
in gdscript it would look like this magic_blast.set_magic_blast_direction(1)
but I don’t know how to get a method from this instance in C ++
MAGIC_BLAST = loader-> load ("res: //Nodes/Player/Magic/Magic_Blast.tscn", "PackedScene");
Node2D * magic_blast = cast_to <Node2D> (MAGIC_BLAST-> instance ());
magic_blast.SetMagicBlastDirection(1)
Take notice that the function is in CamelCase
Wakatta | 2021-08-23 22:56
I just looked in Google and found out what CameCase is, but I didn’t understand you a little
F0remNKB | 2021-08-23 23:09
This is C++, not C#.
sash-rc | 2021-08-24 17:42