Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true.
b = Object:typeOf( name )
string name
boolean b
image = love.graphics.newImage("test.png") print(image:typeOf("Object")) -- outputs: true print(image:typeOf("Drawable")) -- outputs: true print(image:typeOf("Image")) -- outputs: true print(image:typeOf("MouseJoint")) -- outputs: false
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/Object:typeOf