Constructor
new Planet(storage, x, y, colour, mass)
Parameters:
Name | Type | Description |
---|---|---|
storage |
array | Array of GameObject to store itself in |
x |
number | x coordinate |
y |
number | y coordinate |
colour |
string | Colour of planet |
mass |
number | Mass of planet |
- Source:
- To Do:
-
- move to separate radius/mass attribute system
Extends
Members
colour :string
Colour of planet
Type:
- string
- Source:
colour_gradient :string
Transparent edge gradient of the colour
Type:
- string
- Source:
mass :number
Mass AND radius of planet
Type:
- number
- Source:
- To Do:
-
- move to separate radius/mass attribute system
target :boolean
Stage target landing flag
Type:
- boolean
- Source:
type :string
Descriptor of object i.e. "planet" or "rocket"
Type:
- string
- Overrides:
- Source:
x :Number
x coordinate
Type:
- Number
- Overrides:
- Source:
y :Number
y coordinate
Type:
- Number
- Overrides:
- Source:
Methods
draw()
Draws the planet to the canvas in map overview mode
- Source:
draw3d()
Draws the planet to the canvas in first person raytracing mode
- Source: