C# Class Puzzle.GameScript

Main game script for Puzzle mini-game
Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: BrainProject/UnityTemp

Méthodes publiques

Свойство Type Description
backgroundSprite UnityEngine.GameObject
connectedComponents HashSet>
numberPieces int
pieces PuzzlePiece>.Dictionary
puzzleImage UnityEngine.Texture2D
shader UnityEngine.Shader
targetImage Image

Méthodes publiques

Méthode Description
CheckPossibleConnection ( GameObject puzzleObject ) : bool
Start ( ) : void
Update ( ) : void

Private Methods

Méthode Description
CheckVictory ( ) : bool
EndGame ( ) : void
placePuzzlePieces ( ) : void
setOrthographicCamera ( ) : void

Method Details

CheckPossibleConnection() public méthode

public CheckPossibleConnection ( GameObject puzzleObject ) : bool
puzzleObject UnityEngine.GameObject
Résultat bool

Start() public méthode

public Start ( ) : void
Résultat void

Update() public méthode

public Update ( ) : void
Résultat void

Property Details

backgroundSprite public_oe property

The background sprite
public GameObject,UnityEngine backgroundSprite
Résultat UnityEngine.GameObject

connectedComponents public_oe property

A set of connected components (connected component is a set of puzzle pieces, there are used just their gameObjects
public HashSet> connectedComponents
Résultat HashSet>

numberPieces public_oe property

number of puzzle pieces
public int numberPieces
Résultat int

pieces public_oe property

dictionary of all pieces of puzzle. Name used is ID of piece. Dictionary is used to make it faster to get demanded piece
public Dictionary pieces
Résultat PuzzlePiece>.Dictionary

puzzleImage public_oe property

texture of image to complete in puzzle
public Texture2D,UnityEngine puzzleImage
Résultat UnityEngine.Texture2D

shader public_oe property

public Shader,UnityEngine shader
Résultat UnityEngine.Shader

targetImage public_oe property

indicates whether game was won or not
public Image targetImage
Résultat Image