Class for identifying and manipulating new asteroids before they are seen by the player.
More...
|
void | Start () |
| Called on the frame when a script is enabled just before any of the Update methods is called the first time. More...
|
|
void | OnDestroy () |
| This function is called when the object will be destroyed. More...
|
|
Class for identifying and manipulating new asteroids before they are seen by the player.
- Invariant
- At most one instance of this class exists
-
If and only if an instance of this class edists, SpawnCatcher.CatchAsteroidSpawn() will be called whenever a new vessel is created
- Warning
- Assumes that Space Center, Tracking Station, and Flight are the only real-time scenes. May be invalidated by the addition of a Mission Control or Observatory scene in KSP 0.24.
void catchAsteroidSpawn |
( |
Vessel |
vessel | ) |
|
|
package |
Selects newly created asteroids and forwards them to AsteroidManager for processing.
- Parameters
-
[in] | vessel | A newly created ship object |
- Postcondition
- if
vessel
is an asteroid, its properties are modified using AsteroidManager. Otherwise, the function has no effect.
- Note
- if AsteroidManager cannot generate new data for the asteroid, the asteroid is destroyed. This policy is intended to minimize side effects while alerting the player to the presence of a bug.
- Exception Safety
- Does not throw exceptions
This function is called when the object will be destroyed.
- See Also
- Unity Documentation
- Postcondition
- SpawnCatcher.CatchAsteroidSpawn() will no longer be called whenever a new vessel is created
- Todo:
- What exceptions are thrown by GameEvents.onVesselCreate.*?
Called on the frame when a script is enabled just before any of the Update methods is called the first time.
- See Also
- Unity Documentation
- Postcondition
- SpawnCatcher.CatchAsteroidSpawn() will henceforth be called whenever a new vessel is created
- Todo:
- What exceptions are thrown by GameEvents.onVesselCreate.*?
The documentation for this class was generated from the following file: