Class GameManager
Syntax
public class GameManager : MonoBehaviour
Fields
asteroidPrefab
Declaration
public GameObject asteroidPrefab
Field Value
asteroidsEnabled
Declaration
public static bool asteroidsEnabled
Field Value
asteroidSpawnDelay
Declaration
[HideInInspector]
public float asteroidSpawnDelay
Field Value
asteroidSpawnTimer
Declaration
[HideInInspector]
public float asteroidSpawnTimer
Field Value
deaths
Declaration
[HideInInspector]
public int deaths
Field Value
effectsEnabled
Declaration
public static bool effectsEnabled
Field Value
instance
Declaration
public static GameManager instance
Field Value
RELOAD_SCENE_DELAY
Declaration
public const float RELOAD_SCENE_DELAY = 3F
Field Value
score
Declaration
Field Value
scoreSinceLastDeath
Declaration
public static int scoreSinceLastDeath
Field Value
spaceship
Declaration
public static SpaceshipController spaceship
Field Value
SPACESHIP_RESPAWN_DELAY
Declaration
public const float SPACESHIP_RESPAWN_DELAY = 1F
Field Value
spaceshipPrefab
Declaration
public GameObject spaceshipPrefab
Field Value
startEnabled
Declaration
public static bool startEnabled
Field Value
updateEnabled
Declaration
public static bool updateEnabled
Field Value
Properties
IsPaused
Declaration
public static bool IsPaused { get; set; }
Property Value
Methods
AddToScore(Int32)
Declaration
public static void AddToScore(int splitCount)
Parameters
Type |
Name |
Description |
Int32 |
splitCount |
|
InitializeTestingEnvironment(Boolean, Boolean, Boolean, Boolean, Boolean)
Declaration
public static void InitializeTestingEnvironment(bool start, bool update, bool effects, bool asteroids, bool paused)
Parameters
RespawnShip(Single)
Declaration
public void RespawnShip(float delay = 1F)
Parameters
Type |
Name |
Description |
Single |
delay |
|
RespawnShipCoroutine(Single)
Declaration
public IEnumerator RespawnShipCoroutine(float delay)
Parameters
Type |
Name |
Description |
Single |
delay |
|
Returns
SpaceshipIsActive()
Declaration
public static bool SpaceshipIsActive()
Returns
SpawnAsteroids()
Declaration
public void SpawnAsteroids()
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.