![]() ![]() Since it would be enhancement request, and this makes sense to do, maybe inner classes would override in the same way with their given names. So then it would only exclude them from being pushed up into the node list. First time looking at those in 3.1, it seems at least class_name isn't valid there, but at least not needed for is to compare with them. ![]() It never worked with inner classes, which also have names. At least in my mind extends Sprite would report being a "Sprite", but if you tagged on class_name CustomSprite, it would start reporting that it was a CustomSprite. I imagined that the class_name would override the native class name if you used it. For tutorials on common problems that need to be solved when coding games, be sure to check out the Godot Solutions.Also, it's not clear what would this return if the script class don't have a name. The next stage is to start creating your own games. Please use the tutorials here as a future reference to refresh your knowledge. Well that’s it for the basics of GDScript programming. Our scene may then be given a class_name value. We compose a scene in our game by adding Instances of various nodes. This is where a class is composed of instances of other classes. CompositionĪnother OOP concept is Composition. Also, the Inspector panel lists the chain of classes that comprise any node that we are inspecting. In the Editor, we can see the Class hierarchy when we go to add a new node to our scene. Then Node is extended to create Node2D, Spatial and Control classes. This is extended to create the Node class. Starting with the most basic Class called Object. ![]() Godot makes extensive use of Class Inheritance as may be seen in the built-in Node hierarchy.
0 Comments
Leave a Reply. |