Difference between revisions of "Object:type (Español)"
Line 1: | Line 1: | ||
− | Obtiene el tipo del objeto como una cadena(string). | + | Obtiene el tipo del objeto como una cadena (string). |
− | == | + | == Función == |
− | === | + | === Sinopsis === |
<source lang="lua"> | <source lang="lua"> | ||
type = Object:type() | type = Object:type() | ||
</source> | </source> | ||
− | === | + | === Argumentos === |
− | + | Ninguno. | |
− | === | + | === Devuelve === |
− | {{param|string|type|El tipo | + | {{param|string|type|El tipo como una cadena (string).}} |
− | == | + | == Ejemplos == |
=== Imprimir los tipos de un objeto === | === Imprimir los tipos de un objeto === | ||
<source lang="lua"> | <source lang="lua"> | ||
image = love.graphics.newImage("test.png") | image = love.graphics.newImage("test.png") | ||
− | print(image:type()) -- | + | print(image:type()) -- salida: Image |
source = love.audio.newSource("test.ogg") | source = love.audio.newSource("test.ogg") | ||
− | print(source:type()) -- | + | print(source:type()) -- salida: Source |
</source> | </source> | ||
− | == | + | == Véase también== |
* [[parent::Object (Español)]] | * [[parent::Object (Español)]] | ||
− | {{#set:Description=Obtiene el tipo del objeto como una cadena(string).}} | + | {{#set:Description=Obtiene el tipo del objeto como una cadena (string).}} |
{{#set:Since=000}} | {{#set:Since=000}} | ||
[[Category:Functions]] | [[Category:Functions]] | ||
== Other Languages == | == Other Languages == | ||
{{i18n|Object:type}} | {{i18n|Object:type}} |
Latest revision as of 22:55, 18 May 2024
Obtiene el tipo del objeto como una cadena (string).
Contents
Función
Sinopsis
type = Object:type()
Argumentos
Ninguno.
Devuelve
string type
- El tipo como una cadena (string).
Ejemplos
Imprimir los tipos de un objeto
image = love.graphics.newImage("test.png")
print(image:type()) -- salida: Image
source = love.audio.newSource("test.ogg")
print(source:type()) -- salida: Source
Véase también
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info