C# Класс MinigamePexeso.GameScript

Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
columns int
correctPairsDisplay UnityEngine.GUIText
currentGame GameType
customPack System.Boolean
enableSound bool
gameTilePrefab UnityEngine.GameObject
menu UnityEngine.GameObject
resourcePack string
resourcePackMenu UnityEngine.GameObject
rows int
scoreb UnityEngine.GameObject
timerDisplay UnityEngine.GUIText
wrongPairsDisplay UnityEngine.GUIText

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

Метод Описание
AddCustomPicturesToGameTiles ( ) : IEnumerator

Randomly assigns pictures from custom resource pack to game tiles.

AddPicturesToGameTiles ( ) : void

Randomly assigns pictures to game tiles.

CreateGameBoard ( ) : void

Initialization. Creates all cubes and planes, sets their position etc.

FoundPairPexeso ( GameObject first, GameObject second ) : IEnumerator

COROUTINE. Called when user selected two matching pictures

FoundPairSilhouette ( GameObject first, GameObject second ) : IEnumerator

COROUTINE. Called when user selected two pictures which match.

NotFoundPairPexeso ( GameObject first, GameObject second ) : IEnumerator

COROUTINE. Called when user selected two tiles which different pictures

NotFoundPairSilhouette ( GameObject first, GameObject second ) : IEnumerator

COROUTINE. Called when user selected two pictures which do not match.

RestartGame ( ) : IEnumerator

Restarts the game.

Update ( ) : void

Infinite loop. Updates game time and launches specific game turn.

checkTilesMatch ( GameObject first, GameObject second ) : bool

Returns true if pictures of given tiles are matching.

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

Метод Описание
EndGame ( ) : void

Game ended. Play winning music, stop timer, etc.

PexesoGameTurn ( ) : void

Game turn of Pexeso. Calculates clicking on tiles, matching of pairs, starting game tile flip and remove coroutines.

SilhouetteGameTurn ( ) : void

Game turn of Silhouette or Similarities. Calculates clicking on tiles, matching of pairs, starting game tile move and remove coroutines.

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

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

Randomly assigns pictures from custom resource pack to game tiles.
public AddCustomPicturesToGameTiles ( ) : IEnumerator
Результат IEnumerator

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

Randomly assigns pictures to game tiles.
public AddPicturesToGameTiles ( ) : void
Результат void

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

Initialization. Creates all cubes and planes, sets their position etc.
public CreateGameBoard ( ) : void
Результат void

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

COROUTINE. Called when user selected two matching pictures
public FoundPairPexeso ( GameObject first, GameObject second ) : IEnumerator
first UnityEngine.GameObject First object
second UnityEngine.GameObject Second object
Результат IEnumerator

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

COROUTINE. Called when user selected two pictures which match.
public FoundPairSilhouette ( GameObject first, GameObject second ) : IEnumerator
first UnityEngine.GameObject First object
second UnityEngine.GameObject Second object
Результат IEnumerator

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

COROUTINE. Called when user selected two tiles which different pictures
public NotFoundPairPexeso ( GameObject first, GameObject second ) : IEnumerator
first UnityEngine.GameObject First game tile
second UnityEngine.GameObject Second game tile
Результат IEnumerator

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

COROUTINE. Called when user selected two pictures which do not match.
public NotFoundPairSilhouette ( GameObject first, GameObject second ) : IEnumerator
first UnityEngine.GameObject First object
second UnityEngine.GameObject Second object
Результат IEnumerator

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

Restarts the game.
public RestartGame ( ) : IEnumerator
Результат IEnumerator

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

Infinite loop. Updates game time and launches specific game turn.
public Update ( ) : void
Результат void

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

Returns true if pictures of given tiles are matching.
public checkTilesMatch ( GameObject first, GameObject second ) : bool
first UnityEngine.GameObject
second UnityEngine.GameObject
Результат bool

Описание свойств

columns публичное свойство

Number of columns.
public int columns
Результат int

correctPairsDisplay публичное свойство

GUI Number of correct pairs. Used as score.
public GUIText,UnityEngine correctPairsDisplay
Результат UnityEngine.GUIText

currentGame публичное свойство

Current game type.
public GameType currentGame
Результат GameType

customPack публичное свойство

True if custom resource pack is selected.
public Boolean,System customPack
Результат System.Boolean

enableSound публичное свойство

True if sounds are enabled.
public bool enableSound
Результат bool

gameTilePrefab публичное свойство

Game tile.
public GameObject,UnityEngine gameTilePrefab
Результат UnityEngine.GameObject

menu публичное свойство

GameStart script
public GameObject,UnityEngine menu
Результат UnityEngine.GameObject

resourcePack публичное свойство

Determines current resource pack
public string resourcePack
Результат string

resourcePackMenu публичное свойство

ResourcePack script
public GameObject,UnityEngine resourcePackMenu
Результат UnityEngine.GameObject

rows публичное свойство

Number of rows.
public int rows
Результат int

scoreb публичное свойство

Scoreboard. Not used at the moment
public GameObject,UnityEngine scoreb
Результат UnityEngine.GameObject

timerDisplay публичное свойство

GUIText for timer.
public GUIText,UnityEngine timerDisplay
Результат UnityEngine.GUIText

wrongPairsDisplay публичное свойство

GUI Number of wrong pairs. Used as score.
public GUIText,UnityEngine wrongPairsDisplay
Результат UnityEngine.GUIText