C# Class GameplayManager, Imagine_diamond-miner

Inheritance: NetworkBehaviour
Exibir arquivo Open project: Microsoft/Imagine_diamond-miner Class Usage Examples

Public Methods

Method 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

Method 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 method

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

CanUpdateGame() public method

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

FinishLevel() public method

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

IncrementScore() public method

This increments the score by 1.
public IncrementScore ( ) : void
return void

OnHintPressed() public method

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
return void

OnLanguageChanged() public method

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

OnLevelCompleted() public method

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

OnLevelFailed() public method

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

OnNextLevel() public method

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

OnRestart() public method

Raises the restart event.
public OnRestart ( ) : void
return void

OnRetryLevel() public method

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

OnRetryPressed() public method

Called when the retry button is pressed.
public OnRetryPressed ( ) : void
return void

OnStartGame() public method

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

RemoveDiamonds() public method

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

UseDig() public method

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