Use literal blocks for code samples with GDScript.

GDScript is already the default, it's redundant to specify it explicitly.
A [literal block][1] is already enough.

  [1]: https://www.sphinx-doc.org/en/1.8/usage/restructuredtext/basics.html#rst-literal-blocks
This commit is contained in:
asynts
2020-01-13 18:45:39 +01:00
parent faf9472dda
commit 3dede275f4
4 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -481,7 +481,7 @@ Summing it up
Here is the GDScript sample code:
.. code::
::
extends Node
@@ -265,7 +265,7 @@ Loading it on GDScript
]
}
.. code::
::
extends Node
@@ -75,7 +75,7 @@ Using C# from GDScript doesn't need much work. Once loaded
(see :ref:`doc_gdscript_classes_as_resources`) the script can be instantiated
with :ref:`new() <class_CSharpScript_method_new>`.
.. code-block:: gdscript
::
var my_csharp_script = load("res://path_to_cs_file.cs")
var my_csharp_node = my_csharp_script.new()
@@ -116,7 +116,7 @@ Accessing C# fields from GDScript
Accessing C# fields from GDScript is straightforward, you shouldn't have
anything to worry about.
.. code-block:: gdscript
::
print(my_csharp_node.str1) # bar
my_csharp_node.str1 = "BAR"
@@ -160,7 +160,7 @@ marshalling process will do its best to cast your the arguments to match
function signatures.
If that's impossible you'll see the following error: ``Invalid call. Nonexistent function `FunctionName```.
.. code-block:: gdscript
::
my_csharp_node.PrintNodeName(self) # myGDScriptNode
# my_csharp_node.PrintNodeName() # This line will fail.
+1 -1
View File
@@ -264,7 +264,7 @@ The module should include the full Java path. For our example: ``org/godotengine
Then, from your script:
.. code::
::
if Engine.has_singleton("MySingleton"):
var singleton = Engine.get_singleton("MySingleton")