Difference between revisions of "Object:typeOf (Português)"
m (acerto de links) |
m (translation update) |
||
Line 12: | Line 12: | ||
== Exemplos == | == Exemplos == | ||
− | |||
=== Verificando o tipo de um objeto === | === Verificando o tipo de um objeto === | ||
<source lang="lua"> | <source lang="lua"> | ||
Line 24: | Line 23: | ||
== Veja Também == | == Veja Também == | ||
* [[parent::Object (Português)]] | * [[parent::Object (Português)]] | ||
+ | [[Category:Functions]] | ||
{{#set:Description=Verifica se um objeto é de um certo tipo.}} | {{#set:Description=Verifica se um objeto é de um certo tipo.}} | ||
− | + | {{#set:Since=000}} | |
== Outros Idiomas == | == Outros Idiomas == | ||
{{i18n|Object:typeOf}} | {{i18n|Object:typeOf}} |
Revision as of 12:01, 3 July 2011
Verifica se um objeto é de um certo tipo. If the object has the type with the specified name in its hierarchy, this function will return true.
Contents
Função
Sinopse
b = Object:typeOf( tipo )
Argumentos
string (Português) tipo
- O tipo objeto que se quer verificar.
Retornos
boolean (Português) b
- True se o objeto é do tipo especificado, senão false.
Exemplos
Verificando o tipo de um objeto
image = love.graphics.newImage("test.png")
print(image:typeOf("Object")) -- saída: true
print(image:typeOf("Drawable")) -- saída: true
print(image:typeOf("Image")) -- saída: true
print(image:typeOf("MouseJoint")) -- saída: false
Veja Também
Outros Idiomas
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