Difference between revisions of "Object:type (Português)"

Line 7: Line 7:
 
tipo = Object:type()
 
tipo = Object:type()
 
</source>
 
</source>
=== Argument0s ===
+
=== Argumentos ===
 
Nenhum.
 
Nenhum.
=== Returnos ===
+
=== Retornos ===
 
{{param|string|tipo|O tipo como uma string.}}
 
{{param|string|tipo|O tipo como uma string.}}
  

Revision as of 10:27, 2 January 2011

Obtém o tipo do objeto como uma string.

Função

Sinopse

tipo = Object:type()

Argumentos

Nenhum.

Retornos

string tipo
O tipo como uma string.

Exemplos

Imprime o tipo de um objeto

image = love.graphics.newImage("test.png")
print(image:type()) -- saída: Image
source = love.audio.newSource("test.ogg")
print(source:type()) -- saída: Source

Veja Também

Outros Idiomas