Difference between revisions of "Shape:getType"
m (included link to other languages) |
|||
Line 30: | Line 30: | ||
{{#set:Description=Gets a string representing the Shape. | {{#set:Description=Gets a string representing the Shape. | ||
}} | }} | ||
+ | == Other Languages == | ||
+ | {{i18n|Shape:getType}} |
Revision as of 08:43, 23 January 2011
Gets a string representing the Shape. This function can be useful for conditional debug drawing.
Contents
Function
Synopsis
type = Shape:getType( )
Arguments
None.
Returns
ShapeType type
- The type of the Shape.
Examples
Printing the type of a shape
shape1 = love.physics.newCircleShape( my_body, 0, 0, 20 )
print(shape1:getType()) -- outputs: 'circle'
shape2 = love.physics.newPolygonShape( my_body, ... )
print(shape2:getType()) -- outputs: 'polygon'
shape3 = love.physics.newRectangleShape( my_body, x, y, w, h, angle )
print(shape3:getType()) -- outputs: 'polygon'
See Also
Other Languages
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