Difference between revisions of "Object:type (日本語)"
m |
m (Changed term : 出力(output)→結果(result)) |
||
Line 8: | Line 8: | ||
なし。 | なし。 | ||
=== 返値 === | === 返値 === | ||
− | {{param|string|type| | + | {{param|string|type|オブジェクトの種類を文字列形式で返します。}} |
== 用例 == | == 用例 == | ||
− | === | + | === オブジェクトの種類を表示 === |
<source lang="lua"> | <source lang="lua"> | ||
image = love.graphics.newImage("test.png") | image = love.graphics.newImage("test.png") | ||
− | print(image:type()) -- | + | print(image:type()) -- 結果: Image |
source = love.audio.newSource("test.ogg") | source = love.audio.newSource("test.ogg") | ||
− | print(source:type()) -- | + | print(source:type()) -- 結果: Source |
</source> | </source> | ||
Revision as of 14:40, 9 June 2019
オブジェクトの種類を文字列形式で取得します。
関数
概要
type = Object:type()
引数
なし。
返値
string type
- オブジェクトの種類を文字列形式で返します。
用例
オブジェクトの種類を表示
image = love.graphics.newImage("test.png")
print(image:type()) -- 結果: Image
source = love.audio.newSource("test.ogg")
print(source:type()) -- 結果: Source