C# Class GameplayManager, Imagine_diamond-miner

Inheritance: NetworkBehaviour
Afficher le fichier Open project: Microsoft/Imagine_diamond-miner Class Usage Examples

Méthodes publiques

Méthode Description
AddDiamondsToScore ( int diamonds ) : void

This is called when diamonds have been collected by clicking on a tile with diamonds.

CanUpdateGame ( ) : bool

Determines whether the player can launch to start gameplay.

FinishLevel ( ) : void

This is called when the level has been finished in one way or another.

IncrementScore ( ) : void

This increments the score by 1.

OnHintPressed ( ) : void

Called when the hint button is pressed. This button has a cooldown where it will not do anything, to prevent multiple presses.

OnLanguageChanged ( ) : void

This is called from the LanguageMenu when languages are changed.

OnLevelCompleted ( ) : void

Logic that runs when the level tells us it has been completed.

OnLevelFailed ( ) : void

Logic that runs when we have failed a level.

OnNextLevel ( ) : void

Logic that runs when we are requested to move to the next level.

OnRestart ( ) : void

Raises the restart event.

OnRetryLevel ( ) : void

Logic that runs when we are requested to restart the current level.

OnRetryPressed ( ) : void

Called when the retry button is pressed.

OnStartGame ( ) : void

Logic that runs when we are requested to start gameplay.

RemoveDiamonds ( int diamonds ) : void

This is called when a tile with diamonds explodes without being collected.

UseDig ( ) : void

This is called when the player digs up a tile.

Private Methods

Méthode Description
Awake ( ) : void

Awake this instance.

CompleteLevel ( ) : void

Shows a game completion or level completion screen, depending on which level the player just completed.

FailLevel ( ) : void

Shows the Game Over screen.

Start ( ) : void

Called when this behaviour gets initialized. See Unity docs for more information.

StartGame ( ) : void

Sets our game state to in-game so the player can start interacting with the level.

Update ( ) : void

Called once per frame. See Unity docs for more information.

Method Details

AddDiamondsToScore() public méthode

This is called when diamonds have been collected by clicking on a tile with diamonds.
public AddDiamondsToScore ( int diamonds ) : void
diamonds int
Résultat void

CanUpdateGame() public méthode

Determines whether the player can launch to start gameplay.
public CanUpdateGame ( ) : bool
Résultat bool

FinishLevel() public méthode

This is called when the level has been finished in one way or another.
public FinishLevel ( ) : void
Résultat void

IncrementScore() public méthode

This increments the score by 1.
public IncrementScore ( ) : void
Résultat void

OnHintPressed() public méthode

Called when the hint button is pressed. This button has a cooldown where it will not do anything, to prevent multiple presses.
public OnHintPressed ( ) : void
Résultat void

OnLanguageChanged() public méthode

This is called from the LanguageMenu when languages are changed.
public OnLanguageChanged ( ) : void
Résultat void

OnLevelCompleted() public méthode

Logic that runs when the level tells us it has been completed.
public OnLevelCompleted ( ) : void
Résultat void

OnLevelFailed() public méthode

Logic that runs when we have failed a level.
public OnLevelFailed ( ) : void
Résultat void

OnNextLevel() public méthode

Logic that runs when we are requested to move to the next level.
public OnNextLevel ( ) : void
Résultat void

OnRestart() public méthode

Raises the restart event.
public OnRestart ( ) : void
Résultat void

OnRetryLevel() public méthode

Logic that runs when we are requested to restart the current level.
public OnRetryLevel ( ) : void
Résultat void

OnRetryPressed() public méthode

Called when the retry button is pressed.
public OnRetryPressed ( ) : void
Résultat void

OnStartGame() public méthode

Logic that runs when we are requested to start gameplay.
public OnStartGame ( ) : void
Résultat void

RemoveDiamonds() public méthode

This is called when a tile with diamonds explodes without being collected.
public RemoveDiamonds ( int diamonds ) : void
diamonds int
Résultat void

UseDig() public méthode

This is called when the player digs up a tile.
public UseDig ( ) : void
Résultat void