Manages the general game behavior, i.e. is the game paused, is the game completed. Note this in NOT a "main" class as Unity's mono enviroment does not use constructors, thus the object instances in the game are pre-instantiated and thus a "main" class to create the object instances is not needed.
More...
List of all members.
Public Member Functions |
void | Start () |
| Initialises the games values.
|
void | Update () |
| The update loop for the game class. Checks if the play has paused or completed the game.
|
void | OnTriggerEnter (Collider _objectID) |
| The event trigged when the player reaches the goal (enters the box collider).
|
IEnumerator | displayGameCompletedScreen (int _delayGameCompletedScreen) |
| Display the game completed screen.
|
IEnumerator | displayThanksScreen (int _delayThanksScreen) |
| Display the thanks screen.
|
IEnumerator | creditsScreen (int _delayCreditsScreen) |
| Display the credits screen.
|
IEnumerator | restartGame (int _delayToRestart) |
| Restarts the game. Takes the play back to the main menu, once the game has been completed.
|
int | getNumOfSecretItemsCollected () |
| Get the number of secret items collected throughout the game.
|
Detailed Description
Manages the general game behavior, i.e. is the game paused, is the game completed. Note this in NOT a "main" class as Unity's mono enviroment does not use constructors, thus the object instances in the game are pre-instantiated and thus a "main" class to create the object instances is not needed.
- Author:
- Alexander Poolton
- Version:
- 3.0
- Date:
- 23/7/2011
Member Function Documentation
IEnumerator Game::creditsScreen |
( |
int |
_delayCreditsScreen | ) |
[inline] |
Display the credits screen.
- Parameters:
-
[in] | _delayCreditsScreen | The time the credits screen shall be displayed. |
- Returns:
- yield The time the credits screen is displayed for.
IEnumerator Game::displayGameCompletedScreen |
( |
int |
_delayGameCompletedScreen | ) |
[inline] |
Display the game completed screen.
- Parameters:
-
[in] | _delayGameCompletedScreen | The time the game completed screen shall be displayed. |
- Returns:
- yield The time the game completed screen is displayed for.
IEnumerator Game::displayThanksScreen |
( |
int |
_delayThanksScreen | ) |
[inline] |
Display the thanks screen.
- Parameters:
-
[in] | _delayThanksScreen | The time the thanks screen shall be displayed. |
- Returns:
- yield The time the thanks screen is displayed for.
int Game::getNumOfSecretItemsCollected |
( |
| ) |
[inline] |
Get the number of secret items collected throughout the game.
- Returns:
- numOfItemsCollected The number of secret items collected.
void Game::OnTriggerEnter |
( |
Collider |
_objectID | ) |
[inline] |
The event trigged when the player reaches the goal (enters the box collider).
- Parameters:
-
[in] | _objectID | The ID of the object which has entered the collider. |
IEnumerator Game::restartGame |
( |
int |
_delayToRestart | ) |
[inline] |
Restarts the game. Takes the play back to the main menu, once the game has been completed.
- Parameters:
-
[in] | The | time before the game will restart (go back to the main menu). |
- Returns:
- yield The time delay before the game is restarted.
The documentation for this class was generated from the following file:
- C:/Users/Alex/Desktop/Gamepad Classes/Game.cs