C# Class MinigamePexeso.GameSetup

Creates a tile for each image-set (resourcePack) and lets player choose which set will be used for game Set up difficulty and start main game script
Inheritance: UnityEngine.MonoBehaviour
Datei anzeigen Open project: BrainProject/UnityTemp

Public Properties

Property Type Description
currentGame GameType
gameTilePrefab UnityEngine.GameObject
mainGameScript GameScript
resPacksNames string[]

Public Methods

Method Description
CreateResourcePacksIcons ( ) : void

Creates the menu and loads resource packs.

GetMenuDimensions ( int elementsCount ) : int[]

Calculates proper number of rows and columns in menu.

Start ( ) : void

Get resource packs and create menu.

Update ( ) : void

Wait for player to select menu item.

Private Methods

Method Description
DropOther ( GameObject chosenButton, GameObject buttons ) : IEnumerator

COROUTINE. Not selected buttons fall down.

GetCustomResroucePacksCount ( ) : int

Determines if there are any custom resource packs.

LoadCustomResourcePacks ( ) : IEnumerator

Loads the custom resource packs from external files.

startGame ( GameObject chosenButton ) : void

Player selected resource pack. Set difficulty and start game itself and pass some parameters.

Method Details

CreateResourcePacksIcons() public method

Creates the menu and loads resource packs.
public CreateResourcePacksIcons ( ) : void
return void

GetMenuDimensions() public method

Calculates proper number of rows and columns in menu.
public GetMenuDimensions ( int elementsCount ) : int[]
elementsCount int Elements count.
return int[]

Start() public method

Get resource packs and create menu.
public Start ( ) : void
return void

Update() public method

Wait for player to select menu item.
public Update ( ) : void
return void

Property Details

currentGame public_oe property

The current game type.
public GameType currentGame
return GameType

gameTilePrefab public_oe property

The game tile prefab.
public GameObject,UnityEngine gameTilePrefab
return UnityEngine.GameObject

mainGameScript public_oe property

GameStart script Main game script (GameScript)
public GameScript,MinigamePexeso mainGameScript
return GameScript

resPacksNames public_oe property

public string[] resPacksNames
return string[]