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...
Jak czytać dokumentacje Godot API
Na tej stronie, dowiesz się jak czytać dokumentację klas dla API Godota.
API, lub Interfejs Programowania Aplikacji, to indeks tego co Godot oferuje użytkownikom. Zapewnia on krótkie podsumowanie tego jakie klasy istnieją, jakie mają między sobą zależności, jakie funkcjonalności posiadają, oraz jak je tworzyć.
Dziedziczenie
Na górze plików znajduje się nazwa klasy.
Sekcja "Dziedziczenie" wymienia każdą klasę po której obecna dziedziczy. Tutaj CanvasItem dziedziczy po Node i Node dziedziczy po Object.
Sekcja "Dziedziczony Przez" zawiera klasy które są bezpośrednio dziedziczone przez aktualnie otwartą klasę. Na przykładzie Control oraz Node2D dziedziczą po klasie CanvasItem.
Krótki Opis
Następnie krótki opis klasy. Ten tekst pojawia się jako popup w edytorze Godota, przy tworzeniu Węzłów, Zasobów i innych typów.
Opis
Następnie, bardziej szczegółowy opis klasy, jej funkcjonalności i przykładów użycia.
Rzeczy które możesz tutaj znaleźć:
Szczegółowe informacje na temat działania klasy.
Przykładowe wykorzystanie kodu w praktyce.
Konkretne wykorzystanie dostępnych funkcji klasy.
Ostrzeżenia o wymaganych zależnościach lub potrzebnej konfiguracji.
Linki do innych, powiązanych części API Godota.
Samouczki
Poniżej strona dostarcza linki do dokumentacji gdzie wspomniano bądź wykorzystano klasę.
Właściwości
Tabela Właściwości przedstawia listę zmiennych, które posiada instancja klasy.
Lewa kolumna przedstawia rodzaj danych właściwości. Tekst ten jest także odnośnikiem do typu danych w API Godota.
Środkowa kolumna zawiera nazwę zmiennej. Tekst jest także odnośnikiem do pełnego opisu tej właściwości. Używaj tej nazwy, aby uzyskać lub nadać właściwości nową wartość.
Prawa kolumna zawiera domyślną wartość właściwości. Aby zainicjować ją inną wartością, musisz ustawić inną wartość poprzez skrypt, bądź Inspektor.
Metody
Tabela Metody opisuje funkcje, które należą do każdej instancji klasy, także znane jako "metody."
Lewa kolumna zawiera zwracany typ wartości metody.
Prawa kolumna zawiera, nazwę, parametry i modyfikatory metody. Nazwa jest tekstem przed nawiasem otwierającym. Jest ona także odnośnikiem do strony z pełnym opisem metody. Używaj tej nazwy aby wywołać metodę.
Dla każdego parametru, strona przedstawia jego typ danych, nazwę i wartość domyślną, jeśli jakąś posiada.
Możliwe modyfikatory obejmują...
const: metoda nie zmienia żadnych danych w instancji klasy.virtual: metoda nic nie robi, ale oczekuje na skrypt który ją nadpisze.vararg: metoda może akceptować dowolną liczbę argumentów.
Sygnały
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.
Stałe
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.
Property Descriptions
The Property Descriptions list details everything about each property.
It restates the data type and name of the property.
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.
Informacja
Knowing the setter and getter names is useful when one must bind a method name or Callable to something.
Method Descriptions
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.