C# Class MinigamePexeso.GameScript

Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: BrainProject/UnityTemp

Méthodes publiques

Свойство Type Description
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

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

AddCustomPicturesToGameTiles() public méthode

Randomly assigns pictures from custom resource pack to game tiles.
public AddCustomPicturesToGameTiles ( ) : IEnumerator
Résultat IEnumerator

AddPicturesToGameTiles() public méthode

Randomly assigns pictures to game tiles.
public AddPicturesToGameTiles ( ) : void
Résultat void

CreateGameBoard() public méthode

Initialization. Creates all cubes and planes, sets their position etc.
public CreateGameBoard ( ) : void
Résultat void

FoundPairPexeso() public méthode

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
Résultat IEnumerator

FoundPairSilhouette() public méthode

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
Résultat IEnumerator

NotFoundPairPexeso() public méthode

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
Résultat IEnumerator

NotFoundPairSilhouette() public méthode

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
Résultat IEnumerator

RestartGame() public méthode

Restarts the game.
public RestartGame ( ) : IEnumerator
Résultat IEnumerator

Update() public méthode

Infinite loop. Updates game time and launches specific game turn.
public Update ( ) : void
Résultat void

checkTilesMatch() public méthode

Returns true if pictures of given tiles are matching.
public checkTilesMatch ( GameObject first, GameObject second ) : bool
first UnityEngine.GameObject
second UnityEngine.GameObject
Résultat bool

Property Details

columns public_oe property

Number of columns.
public int columns
Résultat int

correctPairsDisplay public_oe property

GUI Number of correct pairs. Used as score.
public GUIText,UnityEngine correctPairsDisplay
Résultat UnityEngine.GUIText

currentGame public_oe property

Current game type.
public GameType currentGame
Résultat GameType

customPack public_oe property

True if custom resource pack is selected.
public Boolean,System customPack
Résultat System.Boolean

enableSound public_oe property

True if sounds are enabled.
public bool enableSound
Résultat bool

gameTilePrefab public_oe property

Game tile.
public GameObject,UnityEngine gameTilePrefab
Résultat UnityEngine.GameObject

menu public_oe property

GameStart script
public GameObject,UnityEngine menu
Résultat UnityEngine.GameObject

resourcePack public_oe property

Determines current resource pack
public string resourcePack
Résultat string

resourcePackMenu public_oe property

ResourcePack script
public GameObject,UnityEngine resourcePackMenu
Résultat UnityEngine.GameObject

rows public_oe property

Number of rows.
public int rows
Résultat int

scoreb public_oe property

Scoreboard. Not used at the moment
public GameObject,UnityEngine scoreb
Résultat UnityEngine.GameObject

timerDisplay public_oe property

GUIText for timer.
public GUIText,UnityEngine timerDisplay
Résultat UnityEngine.GUIText

wrongPairsDisplay public_oe property

GUI Number of wrong pairs. Used as score.
public GUIText,UnityEngine wrongPairsDisplay
Résultat UnityEngine.GUIText