summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Bradfield <chris@kidscancode.org>2019-12-26 10:24:29 -0800
committerChris Bradfield <chris@kidscancode.org>2019-12-26 10:24:29 -0800
commitbc234ce0aee97a4667117626875b96d300a62b48 (patch)
tree2cb6490b3d2cf47f1fe06e7b847e932b9ed4df9e
parent2e76c7ce194046bd7a085a3400a73ceb976b3254 (diff)
[Docs] Description updates for Node2D & Object
-rw-r--r--doc/classes/Node2D.xml4
-rw-r--r--doc/classes/Object.xml6
2 files changed, 8 insertions, 2 deletions
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 29c4680685..67e9597781 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Node2D" inherits="CanvasItem" category="Core" version="3.2">
<brief_description>
- A 2D game object, parent of all 2D-related nodes. Has a position, rotation, scale and Z index.
+ A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index.
</brief_description>
<description>
- A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order.
+ A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index 5a09fe39c0..1e5b8669fd 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -9,6 +9,12 @@
Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++.
Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory.
Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them.
+ Property membership can be tested directly in GDScript using [code]in[/code]:
+ [codeblock]
+ var n = Node2D.new()
+ print("position" in n) # Prints "True".
+ print("other_property" in n) # Prints "False".
+ [/codeblock]
Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification].
</description>
<tutorials>