Standardize all "Prints" comments in documentation
This commit is contained in:
parent
0f95e9f8e6
commit
ca4b29b18d
19 changed files with 104 additions and 97 deletions
|
|
@ -100,7 +100,7 @@
|
|||
|
||||
// propertyPath points to the "position" in the "x" axis of this node.
|
||||
NodePath propertyPath = nodePath.GetAsPropertyPath();
|
||||
GD.Print(propertyPath); // Prints ":position:x".
|
||||
GD.Print(propertyPath); // Prints ":position:x"
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
|
|
@ -118,11 +118,11 @@
|
|||
[codeblocks]
|
||||
[gdscript]
|
||||
var node_path = ^"Sprite2D:texture:resource_name"
|
||||
print(node_path.get_concatenated_subnames()) # Prints "texture:resource_name".
|
||||
print(node_path.get_concatenated_subnames()) # Prints "texture:resource_name"
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var nodePath = new NodePath("Sprite2D:texture:resource_name");
|
||||
GD.Print(nodePath.GetConcatenatedSubnames()); // Prints "texture:resource_name".
|
||||
GD.Print(nodePath.GetConcatenatedSubnames()); // Prints "texture:resource_name"
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
|
|
@ -135,15 +135,15 @@
|
|||
[codeblocks]
|
||||
[gdscript]
|
||||
var sprite_path = NodePath("../RigidBody2D/Sprite2D")
|
||||
print(sprite_path.get_name(0)) # Prints "..".
|
||||
print(sprite_path.get_name(1)) # Prints "RigidBody2D".
|
||||
print(sprite_path.get_name(2)) # Prints "Sprite".
|
||||
print(sprite_path.get_name(0)) # Prints ".."
|
||||
print(sprite_path.get_name(1)) # Prints "RigidBody2D"
|
||||
print(sprite_path.get_name(2)) # Prints "Sprite"
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var spritePath = new NodePath("../RigidBody2D/Sprite2D");
|
||||
GD.Print(spritePath.GetName(0)); // Prints "..".
|
||||
GD.Print(spritePath.GetName(1)); // Prints "PathFollow2D".
|
||||
GD.Print(spritePath.GetName(2)); // Prints "Sprite".
|
||||
GD.Print(spritePath.GetName(0)); // Prints ".."
|
||||
GD.Print(spritePath.GetName(1)); // Prints "PathFollow2D"
|
||||
GD.Print(spritePath.GetName(2)); // Prints "Sprite"
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
|
|
@ -163,13 +163,13 @@
|
|||
[codeblocks]
|
||||
[gdscript]
|
||||
var path_to_name = NodePath("Sprite2D:texture:resource_name")
|
||||
print(path_to_name.get_subname(0)) # Prints "texture".
|
||||
print(path_to_name.get_subname(1)) # Prints "resource_name".
|
||||
print(path_to_name.get_subname(0)) # Prints "texture"
|
||||
print(path_to_name.get_subname(1)) # Prints "resource_name"
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
var pathToName = new NodePath("Sprite2D:texture:resource_name");
|
||||
GD.Print(pathToName.GetSubname(0)); // Prints "texture".
|
||||
GD.Print(pathToName.GetSubname(1)); // Prints "resource_name".
|
||||
GD.Print(pathToName.GetSubname(0)); // Prints "texture"
|
||||
GD.Print(pathToName.GetSubname(1)); // Prints "resource_name"
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
</description>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue