Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
Cómo leer la API de Godot
En esta página, aprenderás cómo leer la referencia de clase para la API de Godot.
La API, o Interfaz de Programación de Aplicaciones (en inglés, Application Programming Interface), es un índice de lo que Godot ofrece a los usuarios. Proporciona un breve resumen de qué clases existen, cómo se relacionan entre sí, qué características tienen y cómo utilizarlas.
Herencia
En la parte superior de cada archivo, verás el nombre de la clase.
La sección "Inherits" (Hereda) enumera cada clase de la que hereda la actual. Aquí, CanvasItem hereda de Node, y Node hereda de Object.
The "Inherited By" section lists each class which directly inherits the
current class. Here Control and Node2D both inherit CanvasItem.
Descripción breve
A continuación, una breve descripción de la clase (class). Este texto aparece en las ventanas emergentes del editor de Godot para crear nodos, recursos y otros tipos.
Descripción
A continuación, una descripción más detallada de la clase (class), sus características y sus casos de uso.
Cosas que puedes encontrar aquí:
Detalles específicos de cómo funciona la clase.
Ejemplos de código de casos de uso comunes.
Detalles de uso que se comparten entre cada uno de los métodos de la clase.
Advertencias sobre dependencias requeridas o configuración.
Enlaces a otras partes relacionadas de la API de Godot.
Tutoriales
La página luego proporciona enlaces a partes del manual que mencionan o hacen uso de la clase actual.
Propiedades
La tabla de propiedades enumera las variables que pertenecen a cada instancia de la clase, también conocidas como "propiedades."
La columna de la izquierda contiene el tipo de dato (data type) de la propiedad. El texto también es un enlace a la página de la API de Godot de ese tipo de dato.
The center column contains the name of the property. The text is also a link to that property's full description on the page. Use this name to get the property's data or set a new value to it.
The right column contains the default value of the property. To initialize it with a different value, you must set a different value via script or the Inspector.
Métodos
The Methods table lists the functions which belong to each instance of the class, also known as the "methods."
The left column contains the data type of the method's return value.
The right column contains the name, parameters, and qualifiers of the method. The name is the text before the opening parenthesis. It is also a link to the method's full description on the page. Use this name to call the method.
For each parameter, the page details its data type, name, and default value, if any.
Possible qualifiers include...
const: the method does not change any data in the class instance.virtual: the method does nothing but wait for a script to override it.vararg: the method can accept an arbitrary number of arguments.
Señales
The Signals list details the names and parameters of events which "signal" a change in game state to other class instances.
Like the Methods table, any parameters will include their data type and name.
Each signal also has a detailed explanation of when the signal is emitted.
Enumerations
The Enumerations list details the enumerable data types associated with the current class.
For each enumeration, the page states its name and then lists its possible values.
For each enumeration value, the page states its name, its integer value, and an explanation of its use case(s) and/or affects.
Constantes
The Constants list details named integer constants in the current class.
For each constant, the page states its name, its integer value, and an explanation of its use case(s) and/or affects.
NOTIFICATION_* constants' descriptions will state which engine event
triggers the notification.
Descripciones de propiedad
The Property Descriptions list details everything about each property.
Define el tipo de dato y nombre de la propiedad.
Every property in the Godot API is bound to a pair of setter and getter functions. Using either is equivalent. They are listed here.
Below that is a detailed summary of what the property's data represents, its use case(s) and/or the affects of changing it. It may include code samples and/or links to relevant parts of the Godot API.
Nota
Knowing the setter and getter names is useful when one must bind a method name or Callable to something.
Descripciones de método
The Method Descriptions list details everything about each method.
It restates the method's return data type, parameter names/types/defaults, and qualifiers.
Below that is a detailed summary of what the method does and its use case(s). It may include code samples and/or links to relevant parts of the Godot API.