C# Класс GameplayManager, Imagine_diamond-miner

Наследование: NetworkBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

AddDiamondsToScore() публичный Метод

This is called when diamonds have been collected by clicking on a tile with diamonds.
public AddDiamondsToScore ( int diamonds ) : void
diamonds int
Результат void

CanUpdateGame() публичный Метод

Determines whether the player can launch to start gameplay.
public CanUpdateGame ( ) : bool
Результат bool

FinishLevel() публичный Метод

This is called when the level has been finished in one way or another.
public FinishLevel ( ) : void
Результат void

IncrementScore() публичный Метод

This increments the score by 1.
public IncrementScore ( ) : void
Результат void

OnHintPressed() публичный Метод

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
Результат void

OnLanguageChanged() публичный Метод

This is called from the LanguageMenu when languages are changed.
public OnLanguageChanged ( ) : void
Результат void

OnLevelCompleted() публичный Метод

Logic that runs when the level tells us it has been completed.
public OnLevelCompleted ( ) : void
Результат void

OnLevelFailed() публичный Метод

Logic that runs when we have failed a level.
public OnLevelFailed ( ) : void
Результат void

OnNextLevel() публичный Метод

Logic that runs when we are requested to move to the next level.
public OnNextLevel ( ) : void
Результат void

OnRestart() публичный Метод

Raises the restart event.
public OnRestart ( ) : void
Результат void

OnRetryLevel() публичный Метод

Logic that runs when we are requested to restart the current level.
public OnRetryLevel ( ) : void
Результат void

OnRetryPressed() публичный Метод

Called when the retry button is pressed.
public OnRetryPressed ( ) : void
Результат void

OnStartGame() публичный Метод

Logic that runs when we are requested to start gameplay.
public OnStartGame ( ) : void
Результат void

RemoveDiamonds() публичный Метод

This is called when a tile with diamonds explodes without being collected.
public RemoveDiamonds ( int diamonds ) : void
diamonds int
Результат void

UseDig() публичный Метод

This is called when the player digs up a tile.
public UseDig ( ) : void
Результат void