Reorder the scene tree and TOC to be so much more cooler

This commit is contained in:
Rémi Verschelde
2016-02-07 22:54:52 +01:00
parent fa00c829f0
commit dbc64c13cc
92 changed files with 326 additions and 271 deletions

View File

@@ -3,8 +3,8 @@ Compiling
.. toctree::
:maxdepth: 1
:name: compiling
:name: toc-compiling
introduction_to_the_buildsystem
compiling_for_windows
compiling_for_linux
@@ -15,7 +15,6 @@ Compiling
compiling_for_universal_windows_apps
batch_building_templates
configure_your_ide
introduction_to_godot_development
.. compiling_for_blackberry_qnx
.. compiling_for_google_native_client

View File

@@ -3,11 +3,11 @@ Developing in C++
.. toctree::
:maxdepth: 1
:name: developing-in-c++
:name: toc-developing
introduction_to_godot_development
core_types
variant_class
object_class
custom_modules_in_c++
creating_android_modules

View File

@@ -3,6 +3,6 @@ Data and file formats
.. toctree::
:maxdepth: 1
:name: data-and-file-formats
:name: toc-formats
binary_serialization_api

View File

@@ -3,9 +3,8 @@ Misc
.. toctree::
:maxdepth: 1
:name: misc
:name: toc-advanced-misc
command_line_tutorial
changing_editor_fonts
services_for_ios

View File

@@ -1,11 +1,11 @@
Advanced topics
===============
Advanced
========
.. toctree::
:maxdepth: 2
:name: advanced-topics
compiling
developing
formats
misc
:name: toc-advanced
_compiling
_developing
_formats
_misc

View File

@@ -3,7 +3,7 @@ Export
.. toctree::
:maxdepth: 1
:name: export
:name: toc-export
exporting_projects
one-click_deploy

View File

@@ -3,6 +3,6 @@ General
.. toctree::
:maxdepth: 1
:name: general
:name: toc-general
managing_image_files

View File

@@ -3,12 +3,10 @@ Import
.. toctree::
:maxdepth: 1
:name: import
:name: toc-import
import_process
importing_textures
importing_3d_meshes
importing_3d_scenes
importing_fonts
importing_audio_samples
importing_translations

View File

@@ -3,9 +3,8 @@ Asset pipeline
.. toctree::
:maxdepth: 2
:name: asset-pipeline
general
import
export
:name: toc-asset-pipeline
_general
_import
_export

View File

@@ -3,7 +3,7 @@ Classes reference
.. toctree::
:maxdepth: 1
:name: class-ref
:name: toc-class-ref
:glob:
class_*

View File

@@ -3,7 +3,7 @@ Contributing
.. toctree::
:maxdepth: 1
:name: contributing
:name: toc-contributing
bug_triage_guidelines
documentation_guidelines

View File

@@ -8,28 +8,40 @@ Welcome to Godot Engine's documentation!
The main documentation for the site is organized into a couple sections:
* :ref:`user-doc`
* :ref:`sec-tutorials`
* :ref:`sec-further`
* :ref:`sec-api-doc`
.. toctree::
:maxdepth: 1
:caption: User documentation
:name: user-doc
:hidden:
:caption: Tutorials
:name: sec-tutorials
tutorials/step_by_step/index
tutorials/engine/index
tutorials/2d/index
tutorials/3d/index
tutorials/_networking
tutorials/_plugins
tutorials/_misc
.. toctree::
:maxdepth: 1
:caption: Getting further
:name: sec-further
tutorials/basic
tutorials/engine
tutorials/2d_tutorials
tutorials/3d_tutorials
tutorials/shaders
tutorials/math
tutorials/advanced
tutorials/editor_plugins
reference/index
classes/index
asset_pipeline/index
reference/index
advanced/index
contributing/index
.. toctree::
:maxdepth: 1
:caption: API documentation
:name: sec-api-doc
classes/index
.. Indices and tables
.. ------------------
..

View File

@@ -3,7 +3,7 @@ Cheat sheets
.. toctree::
:maxdepth: 1
:name: cheat-sheets
:name: toc-cheat-sheets
2d_and_3d_keybindings
inheritance_class_tree

View File

@@ -3,10 +3,10 @@ Languages
.. toctree::
:maxdepth: 1
:name: languages
:name: toc-languages
gdscript
gdscript_more_efficiently
shader
shading_language
locales
richtextlabel_bbcode

View File

@@ -1,5 +1,8 @@
GDScript
========
Introduction
============
------------
GDScript is a high level, dynamically typed programming language used to
create content. It uses a syntax that is very similar to the Python
@@ -8,7 +11,7 @@ and tightly integrated with the engine, allowing great flexibility for
content creation and integration.
History
=======
-------
Initially, Godot was designed to support multiple scripting languages
(this ability still exists today). However, only GDScript is in use
@@ -44,7 +47,7 @@ for Lua and Squirrel, and equally as functional. With time, having a
built-in language has proven to be a huge advantage.
Example
=======
-------
Some people can learn better by just taking a look at the syntax, so
here's a simple example of how it looks.
@@ -113,10 +116,10 @@ C, C++, or C# but never used a dynamically typed one, it is advised you
read this tutorial: [[GDScript (More Efficiently)]].
Language
========
--------
Identifiers
-----------
~~~~~~~~~~~
Any string that restricts itself to alphabetic characters (``a`` to
``z`` and ``A`` to ``Z``), digits (``0`` to ``9``) and ``_`` qualifies
@@ -124,13 +127,13 @@ as an identifier. Additionally, identifiers must not begin with a digit.
Identifiers are case-sensitive (``foo`` is different from ``FOO``).
Keywords
--------
~~~~~~~~
The following is the list of keywords supported by the language. Since
keywords are reserved words (tokens), they can't be used as identifiers.
Operators
---------
~~~~~~~~~
The following is the list of supported operators and their precedence
(TODO, change since this was made to reflect python operators)
@@ -174,7 +177,7 @@ The following is the list of supported operators and their precedence
+---------------------------------------------------------------+-----------------------------------------+
Literals
--------
~~~~~~~~
+--------------------------+--------------------------------+
| **Literal** | **Type** |
@@ -193,7 +196,7 @@ Literals
+--------------------------+--------------------------------+
Comments
--------
~~~~~~~~
Anything from a ``#`` to the end of the line is ignored and is
considered a comment.
@@ -212,82 +215,82 @@ the beginning and end of a block of text.
a comment """
Built-In Types
==============
--------------
Basic Built-In Types
--------------------
~~~~~~~~~~~~~~~~~~~~
A variable in GDScript can be assigned to several built-in types.
null
~~~~
^^^^
null is a data type that contains no information, nothing assigned, and
it's just empty. It can only be set to one value: ``null``.
bool
~~~~
^^^^
The Boolean data type can only contain ``true`` or ``false``.
int
~~~
^^^
The integer data type can only contain integer numbers, (both negative
and positive).
float
~~~~~
^^^^^
Used to contain a floating point value (real numbers).
`String <https://github.com/okamstudio/godot/wiki/class_string>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A sequence of characters in Unicode format. Strings can contain the
standard C escape sequences.
Vector Built-In Types
---------------------
~~~~~~~~~~~~~~~~~~~~~
`Vector2 <https://github.com/okamstudio/godot/wiki/class_vector2>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2D vector type containing ``x`` and ``y`` fields. Can alternatively
access fields as ``width`` and ``height`` for readability. Can also be
accessed as array.
`Rect2 <https://github.com/okamstudio/godot/wiki/class_rect2>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2D Rectangle type containing two vectors fields: ``pos`` and ``size``.
Alternatively contains an ``end`` field which is ``pos+size``.
`Vector3 <https://github.com/okamstudio/godot/wiki/class_vector3>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3D vector type containing ``x``, ``y`` and ``z`` fields. This can also
be accessed as an array.
`Matrix32 <https://github.com/okamstudio/godot/wiki/class_matrix32>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3x2 matrix used for 2D transforms.
`Plane <https://github.com/okamstudio/godot/wiki/class_plane>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3D Plane type in normalized form that contains a ``normal`` vector field
and a ``d`` scalar distance.
`Quat <https://github.com/okamstudio/godot/wiki/class_quat>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Quaternion is a datatype used for representing a 3D rotation. It's
useful for interpolating rotations.
`AABB <https://github.com/okamstudio/godot/wiki/class_aabb>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Axis Aligned bounding box (or 3D box) contains 2 vectors fields: ``pos``
and ``size``. Alternatively contains an ``end`` field which is
@@ -295,61 +298,61 @@ and ``size``. Alternatively contains an ``end`` field which is
interchangeably.
`Matrix3 <https://github.com/okamstudio/godot/wiki/class_matrix3>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3x3 matrix used for 3D rotation and scale. It contains 3 vector fields
(``x``, ``y`` and ``z``) and can also be accessed as an array of 3D
vectors.
`Transform <https://github.com/okamstudio/godot/wiki/class_transform>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3D Transform contains a Matrix3 field ``basis`` and a Vector3 field
``origin``.
Engine Built-In Types
---------------------
~~~~~~~~~~~~~~~~~~~~~
`Color <https://github.com/okamstudio/godot/wiki/class_color>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Color data type contains ``r``, ``g``, ``b``, and ``a`` fields. It can
also be accessed as ``h``, ``s``, and ``v`` for hue/saturation/value.
`Image <https://github.com/okamstudio/godot/wiki/class_image>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Contains a custom format 2D image and allows direct access to the
pixels.
`NodePath <https://github.com/okamstudio/godot/wiki/class_nodepath>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compiled path to a node used mainly in the scene system. It can be
easily assigned to, and from, a String.
`RID <https://github.com/okamstudio/godot/wiki/class_rid>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Resource ID (RID). Servers use generic RIDs to reference opaque data.
`Object <https://github.com/okamstudio/godot/wiki/class_object>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Base class for anything that is not a built-in type.
`InputEvent <https://github.com/okamstudio/godot/wiki/class_inputevent>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Events from input devices are contained in very compact form in
InputEvent objects. Due to the fact that they can be received in high
amounts from frame to frame they are optimized as their own data type.
Container Built-In Types
------------------------
~~~~~~~~~~~~~~~~~~~~~~~~
`Array <https://github.com/okamstudio/godot/wiki/class_array>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Generic sequence of objects. Its size can be changed to anything and
starts from index 0.
@@ -370,7 +373,7 @@ and generally run a little slower, so they are only justified for very
large amount of data.
`Dictionary <https://github.com/okamstudio/godot/wiki/class_dictionary>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Associative container which contains values referenced by unique keys.
@@ -392,7 +395,7 @@ write and read:
}
`ByteArray <https://github.com/okamstudio/godot/wiki/class_bytearray>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An array of bytes can only contain bytes (integers from 0 to 255).
@@ -400,40 +403,40 @@ This, and all of the following specialized array types, are optimized
for memory usage and can't fragment the memory.
`IntArray <https://github.com/okamstudio/godot/wiki/class_intarray>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Array of integers can only contain integers.
`FloatArray <https://github.com/okamstudio/godot/wiki/class_floatarray>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Array of floats can only contain floats.
`StringArray <https://github.com/okamstudio/godot/wiki/class_stringarray>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Array of strings can only contain strings.
`Vector2Array <https://github.com/okamstudio/godot/wiki/class_vector2array>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Array of Vector2 can only contain 2D Vectors.
`Vector3Array <https://github.com/okamstudio/godot/wiki/class_vector3array>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Array of Vector3 can only contain 3D Vectors.
`ColorArray <https://github.com/okamstudio/godot/wiki/class_colorarray>`__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Array of Color can only contains colors.
Data
====
----
Variables
---------
~~~~~~~~~
Variables can exist as class members or local to functions. They are
created with the ``var`` keyword and may, optionally, be assigned a
@@ -447,7 +450,7 @@ value upon initialization.
var d = b + c # variables are always initialized in order
Constants
---------
~~~~~~~~~
Constants are similar to variables, but must be constants or constant
expressions and must be assigned on initialization.
@@ -463,7 +466,7 @@ expressions and must be assigned on initialization.
const g = x + 20 # invalid; this is not a constant expression!
Functions
---------
~~~~~~~~~
Functions always belong to a class. The scope priority for variable
look-up is: local→class member→global. ``self`` is provided as an option
@@ -481,14 +484,14 @@ return value is null.
return a + b # return is optional; without it null is returned
Statements and Control Flow
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Statements are standard and can be assignments, function calls, control
flow structures, etc (see below). ``;`` as a statement separator is
entirely optional.
if/else/elif
~~~~~~~~~~~~
^^^^^^^^^^^^
Simple conditions are created by using the *if/else/elif* syntax.
Parenthesis around statements is allowed, but not required. Given the
@@ -505,7 +508,7 @@ else:/if: to maintain a level of indentation.
statement(s)
while
~~~~~
^^^^^
Simple loops are created by using *while* syntax. Loops can be broken
using *break* or continued using *continue*:
@@ -516,7 +519,7 @@ using *break* or continued using *continue*:
statement(s)
for
~~~
^^^
To iterate through a range, such as an array or table, a *for* loop is
used. For loops store the index in the loop variable on each iteration.
@@ -540,7 +543,7 @@ used. For loops store the index in the loop variable on each iteration.
statement # similar to [2, 4, 6] but does not allocate an array
Function Call on Base Class
~~~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^^^
To call a function on a base class (that was overridden in the current
one), prepend ``.`` to the function name:
@@ -555,7 +558,7 @@ notifications such as ``_enter_tree``, ``_exit_tree``, ``_process``,
so this should be only for calling functions you write yourself.
Classes
=======
^^^^^^^
By default, the body of a script file is an unnamed class and it can
only be referenced externally as a resource or file. Class syntax is
@@ -567,7 +570,7 @@ variables (including arrays and dictionaries) are initialized every time
an instance is created.
Class File Example
------------------
~~~~~~~~~~~~~~~~~~
Imagine the following being stored in a file like myclass.gd.
@@ -579,7 +582,7 @@ Imagine the following being stored in a file like myclass.gd.
print(a)
Inheritance
-----------
~~~~~~~~~~~
A class file can inherit from a global class, another file or a subclass
inside another file. Multiple inheritance is not allowed. The
@@ -601,7 +604,7 @@ inside another file. Multiple inheritance is not allowed. The
extends "somefile.gd".Subclass
Inheritance Testing
-------------------
~~~~~~~~~~~~~~~~~~~
It's possible to check if an instance inherits from a given class. For
this the ``extends`` keyword can be used as an operator instead:
@@ -616,13 +619,13 @@ this the ``extends`` keyword can be used as an operator instead:
entity.apply_damage()
Constructor
-----------
~~~~~~~~~~~
A class can have an optional constructor; a function named ``_init``
that is called when the class is instanced.
Arguments to Parent Constructor
-------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When inheriting, parent constructors are called automatically (no need
to call ``._init()``). If a parent constructor takes arguments, they are
@@ -634,7 +637,7 @@ passed like this:
pass
Sub Classes
-----------
~~~~~~~~~~~
A class file can have subclasses. This syntax should be straightforward:
@@ -650,7 +653,7 @@ A class file can have subclasses. This syntax should be straightforward:
sc.print_value_of_a()
Classes as Objects
------------------
~~~~~~~~~~~~~~~~~~
It may be desired at some point to load a class from a file and then
instance it. Since the global scope does not exist, classes must be
@@ -670,7 +673,7 @@ in a class object:
a.somefunction()
Exports
-------
~~~~~~~
Class members can be exported. This means their value gets saved along
with a scene. If class members have initializers to constant
@@ -745,7 +748,7 @@ editor, the exported properties are still editable (see below for
"tool").
Exporting bit flags
~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^
Integers used as bit flags can store multiple true/false (boolean)
values in one property. By using the export hint ``int, FLAGS``, they
@@ -771,7 +774,7 @@ Using bit flags requires some understanding of bitwise operations. If in
doubt, boolean variables should be exported instead.
Exporting Arrays
~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^
Exporting arrays works too but there is a restriction. While regular
arrays are created local to every instance, exported arrays are shared
@@ -798,7 +801,7 @@ initializers, but they must be constant expressions.
var b = [a,2,3]
Static Functions
----------------
~~~~~~~~~~~~~~~~
A function can be declared static. When a function is static it has no
access to the instance member variables or ``self``. This is mainly
@@ -810,7 +813,7 @@ useful to make libraries of helper functions:
return a + b
Setters/Getters
---------------
~~~~~~~~~~~~~~~
| It is often useful to know when an member variable changed. It may
also be desired to encapsulate its access. For this, GDScript provides
@@ -867,7 +870,7 @@ getter. For example:
print(self.myinteger)
Tool Mode
---------
~~~~~~~~~
Scripts, by default, don't run inside the editor and only the exported
properties can be changed. In some cases it is desired that they do run
@@ -884,7 +887,7 @@ placed at the top of the file:
print("Hello")
Memory Management
-----------------
~~~~~~~~~~~~~~~~~
If a class inherits from [[Class:Reference]], then instances will be
freed when no longer in use. No garbage collector exists, just simple
@@ -895,7 +898,7 @@ avoid reference cycles that can't be freed, a ``weakref`` function is
provided for creating weak references.
Function References
-------------------
~~~~~~~~~~~~~~~~~~~
Functions can't be referenced because they are not treated as class
members. There are two alternatives to this, though. The ``call``
@@ -909,7 +912,7 @@ function or the ``funcref`` helper.
fr.call_func(args)
Signals
-------
~~~~~~~
It is often desired to send a notification that something happened in an
instance. GDScript supports creation of built-in Godot signals.
@@ -970,7 +973,7 @@ Object.emit\_signal method:
someinstance.emit_signal("somesignal")
Coroutines
----------
~~~~~~~~~~
GDScript has some support for coroutines via the ``yield`` built-in
function. The way it works is very simple: Calling ``yield()`` will
@@ -1031,7 +1034,7 @@ Will print:
cheers!
Coroutines & Signals
--------------------
~~~~~~~~~~~~~~~~~~~~
The real strength of using ``yield`` is when combined with signals.
``yield`` can accept two parameters, an object and a signal. When the

View File

@@ -3,7 +3,7 @@ Reference
.. toctree::
:maxdepth: 2
:name: reference
:name: toc-reference
languages
cheat_sheets
_languages
_cheat_sheets

View File

@@ -0,0 +1,14 @@
Graphics
========
.. toctree::
:maxdepth: 1
:name: toc-2d-graphics
canvas_layers
viewport_and_canvas_transforms
custom_drawing_in_2d
screen-reading_shaders
particle_systems_2d
cutout_animation
tilemap

10
tutorials/2d/_gui.rst Normal file
View File

@@ -0,0 +1,10 @@
Graphical user interface (GUI)
==============================
.. toctree::
:maxdepth: 1
:name: toc-2d-gui
size_and_anchors
gui_skinning
custom_gui_controls

10
tutorials/2d/_physics.rst Normal file
View File

@@ -0,0 +1,10 @@
Physics
=======
.. toctree::
:maxdepth: 1
:name: toc-2d-physics
physics_and_collision_2d
kinematic_character_2d
ray-casting

10
tutorials/2d/index.rst Normal file
View File

@@ -0,0 +1,10 @@
2D tutorials
============
.. toctree::
:maxdepth: 2
:name: toc-2d-tutorials
_graphics
_gui
_physics

View File

@@ -1,8 +1,5 @@
Physics & Collision (2D)
========================
Introduction
------------
Physics introduction
====================
Our world is made of tangible matter. In our world, a piano can't go
through a wall when going into a house. It needs to use the door. Video

View File

@@ -1,4 +1,4 @@
Screen Reading Shaders
Screen-reading shaders
======================
Introduction

View File

@@ -38,19 +38,3 @@ it, leaving a 20 pixel margin:
Finally, there is also a ratio option, where 0 means left, 1 means right
and anything in between is interpolated.
[STRIKEOUT:Containers] (TODO)
-----------------------------
- [STRIKEOUT:This poses a difficult problem]
- [STRIKEOUT:There are two ways of dealing]
- [STRIKEOUT:style boxes]
- [STRIKEOUT:title menu example]
- [STRIKEOUT:containers]
- [STRIKEOUT:theme]
- [STRIKEOUT:focus]
*Juan Linietsky, Ariel Manzur, Distributed under the terms of the `CC
By <https://creativecommons.org/licenses/by/3.0/legalcode>`__ license.*

View File

@@ -1,21 +0,0 @@
2D tutorials
============
.. toctree::
:maxdepth: 1
:name: 2d-tutorials
physics_and_collision_2d
tilemap
kinematic_character_2d
gui_skinning
particle_systems_2d
canvas_layers
viewport_and_canvas_transforms
custom_drawing_in_node2d_control
custom_gui_controls
screen-reading_shaders
ray-casting
cut-out_animation
.. gui_containers
.. phyics_objet_guide

View File

@@ -0,0 +1,17 @@
Graphics
========
.. toctree::
:maxdepth: 1
:name: toc-3d-graphics
introduction
materials
fixed_materials
shader_materials
lighting
shadow_mapping
high_dynamic_range
3d_performance_and_limitations
working_with_3d_skeletons
inverse_kinematics

9
tutorials/3d/_import.rst Normal file
View File

@@ -0,0 +1,9 @@
Import
======
.. toctree::
:maxdepth: 1
:name: toc-3d-import
importing_3d_meshes
importing_3d_scenes

View File

@@ -0,0 +1,8 @@
Physics
=======
.. toctree::
:maxdepth: 1
:name: toc-3d-physics
../ray-casting

10
tutorials/3d/index.rst Normal file
View File

@@ -0,0 +1,10 @@
3D tutorials
============
.. toctree::
:maxdepth: 2
:name: toc-3d-tutorials
_graphics
_physics
_import

View File

@@ -1,8 +1,5 @@
Creating 3D games
=================
Introduction
~~~~~~~~~~~~
============
Creating a 3D game can be challenging. That extra Z coordinate makes
many of the common techniques that helped to make 2D games simple no

View File

@@ -1,27 +0,0 @@
3D tutorials
============
.. toctree::
:maxdepth: 1
:name: 3d-tutorials
creating_3d_games
materials
fixed_materials
shader_materials
lighting
shadow_mapping
high_dynamic_range
3d_performance_and_limitations
ray-casting
working_with_3d_skeletons
inverse_kinematics
.. procedural_geometry
.. light_baking
.. 3d_sprites
.. using_the_animationtreeplayer
.. portals_and_rooms
.. vehicle
.. grimap
.. spatial_audio
.. toon_shading

View File

@@ -3,7 +3,7 @@ Math
.. toctree::
:maxdepth: 1
:name: math
:name: toc-math
vector_math
matrices_and_transforms

9
tutorials/_misc.rst Normal file
View File

@@ -0,0 +1,9 @@
Miscellaneous
=============
.. toctree::
:maxdepth: 2
:name: toc-misc-tutorials
_math
_shaders

View File

@@ -0,0 +1,9 @@
Networking
==========
.. toctree::
:maxdepth: 1
:name: toc-networking
ssl_certificates
http_client_class

View File

@@ -1,9 +1,11 @@
Editor plug-ins
===============
Editor plugins
==============
Coming soon™.
.. toctree::
:maxdepth: 1
:name: editor-plugins
:name: toc-plugins
.. editor_plugin
.. editor_extension

View File

@@ -3,7 +3,7 @@ Shaders
.. toctree::
:maxdepth: 1
:name: shaders
:name: toc-shaders
mesh_generation_with_heightmap_and_shaders
.. vertex_shaders_introduction

View File

@@ -1,10 +0,0 @@
Engine
======
.. toctree::
:maxdepth: 1
:name: engine
paths
http_client_class
.. thread_safety

View File

@@ -1,23 +0,0 @@
Engine
======
.. toctree::
:maxdepth: 1
:name: engine
viewports
screen_scaling_and_multiple_resolutions
input_events_and_actions
mouse_and_input_coordinates
version_control_and_project_organization
gui_control_repositioning
background_loading
saving_your_game
encrypting_save_games
internationalizing_a_game
handling_quit_request
pausing_the_game
ssl_certificates
changing_scenes_advanced
.. basic_networking_tcp_and_udp
.. gamepad_keyboard_controlled_guis

View File

@@ -0,0 +1,11 @@
Filesystem
==========
.. toctree::
:maxdepth: 1
:name: toc-filesystem
version_control_and_project_organization
path_separators
saving_your_game
encrypting_save_games

View File

@@ -0,0 +1,11 @@
Game flow
=========
.. toctree::
:maxdepth: 1
:name: toc-game-flow
pausing_the_game
background_loading
using_multiple_threads
handling_quit_request

View File

@@ -0,0 +1,8 @@
Internationalization
====================
.. toctree::
:maxdepth: 1
:name: toc-i18n
internationalizing_a_game

View File

@@ -0,0 +1,11 @@
Scene, input & viewports
========================
.. toctree::
:maxdepth: 1
:name: toc-scene-input-viewports
viewports
screen_scaling_and_multiple_resolutions
input_events_and_actions
mouse_and_input_coordinates

View File

@@ -259,7 +259,7 @@ loader.
get_node("/root").add_child(current_scene)
Using multiple threads
======================
----------------------
ResourceInteractiveLoader can be used from multiple threads. A couple of
things to keep in mind if you attempt it:

View File

@@ -0,0 +1,11 @@
Engine
======
.. toctree::
:maxdepth: 2
:name: toc-engine
_scene_input_viewports
_filesystem
_i18n
_game_flow

View File

@@ -1,5 +1,8 @@
Paths
=====
Path Separators
===============
---------------
| For the sake of supporting as many platforms as possible, Godot only
accepts unix style path separators (/). These work everywhere,

View File

@@ -1,5 +1,5 @@
Example
=======
HTTP client class example
=========================
Here's an example of using the
`HTTPClient <https://github.com/okamstudio/godot/wiki/class_httpclient>`__

View File

@@ -1,15 +0,0 @@
Tutorials
=========
.. toctree::
:maxdepth: 2
:name: tutorials
basic
engine
2d_tutorials
3d_tutorials
shaders
math
advanced
editor_plugins

View File

@@ -1,5 +1,5 @@
Generate a mesh using a heightmap and vertex fragment shaders
=============================================================
Mesh generation with heightmap and shaders
==========================================
Introduction
------------

View File

@@ -1,5 +1,5 @@
Animation Tutorial
==================
Animations
==========
Introduction
------------

View File

@@ -1,5 +1,5 @@
File System
===========
Filesystem
==========
Introduction
------------

View File

@@ -1,4 +1,4 @@
GUI Tutorial
GUI tutorial
============
Introduction

View File

@@ -1,19 +1,19 @@
Basic (step by step)
====================
Learning step by step
=====================
.. toctree::
:maxdepth: 1
:name: basic
:name: toc-step-by-step
scenes_and_nodes
instancing
instancing_continued
scripting
scripting_continued
creating_2d_games
gui_introduction
simple_2d_game
gui_tutorial
creating_splash_screen
animation
animations
resources
file_system
scene_tree

View File

@@ -1,7 +1,7 @@
Resources
=========
Nodes AND Resources
Nodes and Resources
-------------------
So far, `Node <https://github.com/okamstudio/godot/wiki/class_node>`__

View File

@@ -1,4 +1,4 @@
Scenes and Nodes
Scenes and nodes
================
Introduction

View File

@@ -1,4 +1,4 @@
Scripting (Continued)
Scripting (continued)
=====================
Processing

View File

@@ -1,4 +1,4 @@
Simple 2D Game (Pong!)
Simple 2D game (Pong!)
======================
Pong

View File

@@ -1,4 +1,4 @@
Splash Screen
Splash screen
=============
Tutorial