Difference between revisions of "Oolite JavaScript Reference: Sun"
(Updating Oolite scripting documentation for 1.73.) |
|||
Line 8: | Line 8: | ||
== Properties == |
== Properties == |
||
=== <code>hasGoneNova</code> === |
=== <code>hasGoneNova</code> === |
||
− | {{Oolite-prop- |
+ | {{Oolite-prop-added|1.72}} |
'''hasGoneNova''' : Boolean (read-only) |
'''hasGoneNova''' : Boolean (read-only) |
||
True if the sun has gone nova. |
True if the sun has gone nova. |
||
Line 15: | Line 15: | ||
=== <code>isGoingNova</code> === |
=== <code>isGoingNova</code> === |
||
− | {{Oolite-prop- |
+ | {{Oolite-prop-added|1.72}} |
'''isGoingNova''' : Boolean (read-only) |
'''isGoingNova''' : Boolean (read-only) |
||
True if the sun is scheduled to go nova. |
True if the sun is scheduled to go nova. |
||
Line 24: | Line 24: | ||
'''radius''' : Number (read-only) |
'''radius''' : Number (read-only) |
||
The equatorial radius of the sun, in metres. |
The equatorial radius of the sun, in metres. |
||
− | |||
== Methods == |
== Methods == |
Revision as of 19:31, 3 November 2008
Prototype: Entity
Subtypes: none
This class was added in Oolite test release 1.70.
The Sun
class is an Entity
representing a sun. A Sun
has all the properties and methods of a Entity
, and several others. Currently, Oolite supports at most one sun per system, accessible via the system.sun
property.
Contents
Properties
hasGoneNova
This property was added in Oolite test release 1.72.
hasGoneNova : Boolean (read-only)
True if the sun has gone nova.
See Also: isGoingNova
, goNova()
isGoingNova
This property was added in Oolite test release 1.72.
isGoingNova : Boolean (read-only)
True if the sun is scheduled to go nova.
See Also: hasGoneNova
, goNova()
, cancelNova()
radius
radius : Number (read-only)
The equatorial radius of the sun, in metres.
Methods
cancelNova
function cancelNova()
Cancels a scheduled nova, if a nova has been scheduled but not yet occurred.
See Also: hasGoneNova
, isGoingNova
, goNova()
goNova
function goNova([delay : Number])
Causes the sun to explode. The optional delay
parameter causes the nova to happen after a specified delay (specified in seconds in game real time).
See Also: hasGoneNova
, isGoingNova
, cancelNova()