Difference between revisions of "Object:type"
(Created page with 'Gets the type of the object as a string. == Function == === Synopsis === <source lang="lua"> type = Object:type() </source> === Arguments === None. === Returns === {{param|stri…') |
|||
Line 1: | Line 1: | ||
+ | {{newin|[[0.7.0]]|type=function}} | ||
Gets the type of the object as a string. | Gets the type of the object as a string. | ||
Revision as of 15:56, 22 September 2010
Available since LÖVE 0.7.0 |
This function is not supported in earlier versions. |
Gets the type of the object as a string.
Contents
Function
Synopsis
type = Object:type()
Arguments
None.
Returns
string type
- The type as a string.
Examples
Printing the type of an object
image = love.graphics.newImage("test.png")
print(image:type()) -- outputs: Image
source = love.audio.newSource("test.ogg")
print(source:type()) -- outputs: Source