Difference between revisions of "love.physics.newWorld"
Line 1: | Line 1: | ||
Creates a new World. | Creates a new World. | ||
+ | |||
+ | {{newin|[[0.7.0]]|type=variants|plural=y}} | ||
+ | {{oldin|[[0.8.0]]|type=variants|plural=y}} | ||
+ | == Function == | ||
This function creates a new World with the given size, no gravity and sleeping turned on. | This function creates a new World with the given size, no gravity and sleeping turned on. | ||
− | |||
− | |||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> | ||
Line 27: | Line 29: | ||
{{param|number|yg|The y component of gravity.}} | {{param|number|yg|The y component of gravity.}} | ||
{{param|boolean|sleep (true)|Whether sleep is possible in the world.}} | {{param|boolean|sleep (true)|Whether sleep is possible in the world.}} | ||
+ | === Returns === | ||
+ | {{param|World|world|A brave new World.}} | ||
+ | ---- | ||
+ | {{newin|[[0.8.0]]|type=variants|plural=y}} | ||
+ | == Function == | ||
+ | This function creates a new World with no gravity and sleeping turned on. | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | world = love.physics.newWorld( ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | None. | ||
=== Returns === | === Returns === | ||
{{param|World|world|A brave new World.}} | {{param|World|world|A brave new World.}} | ||
== Function == | == Function == | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | world = love.physics.newWorld( xg, yg, sleep ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|number|xg|The x component of gravity.}} | ||
+ | {{param|number|yg|The y component of gravity.}} | ||
+ | {{param|boolean|sleep (true)|Whether sleep is possible in the world.}} | ||
+ | === Returns === | ||
+ | {{param|World|world|A brave new World.}} | ||
+ | ---- | ||
{{oldin|[[0.7.0]]|type=variant}} | {{oldin|[[0.7.0]]|type=variant}} | ||
+ | == Function == | ||
=== Synopsis === | === Synopsis === | ||
<source lang="lua"> | <source lang="lua"> |
Revision as of 23:41, 8 January 2012
Creates a new World.
Available since LÖVE 0.7.0 |
These variants are not supported in earlier versions. |
Removed in LÖVE 0.8.0 |
These variants are not supported in that and later versions. |
Contents
Function
This function creates a new World with the given size, no gravity and sleeping turned on.
Synopsis
world = love.physics.newWorld( x1, y1, x2, y2 )
Arguments
number x1
- The smallest x position in the world.
number y1
- The smallest y position in the world.
number x2
- The largest x position in the world.
number y2
- The largest y position in the world.
Returns
World world
- A World object.
Function
Synopsis
world = love.physics.newWorld( x1, y1, x2, y2, xg, yg, sleep )
Arguments
number x1
- The smallest x position in the world.
number y1
- The smallest y position in the world.
number x2
- The largest x position in the world.
number y2
- The largest y position in the world.
number xg
- The x component of gravity.
number yg
- The y component of gravity.
boolean sleep (true)
- Whether sleep is possible in the world.
Returns
World world
- A brave new World.
Available since LÖVE 0.8.0 |
These variants are not supported in earlier versions. |
Function
This function creates a new World with no gravity and sleeping turned on.
Synopsis
world = love.physics.newWorld( )
Arguments
None.
Returns
World world
- A brave new World.
Function
Synopsis
world = love.physics.newWorld( xg, yg, sleep )
Arguments
number xg
- The x component of gravity.
number yg
- The y component of gravity.
boolean sleep (true)
- Whether sleep is possible in the world.
Returns
World world
- A brave new World.
Removed in LÖVE 0.7.0 |
This variant is not supported in that and later versions. |
Function
Synopsis
world = love.physics.newWorld( w, h )
Arguments
Returns
World world
- A World object.
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