C# Class Puzzle.GameScript

Main game script for Puzzle mini-game
Inheritance: UnityEngine.MonoBehaviour
ファイルを表示 Open project: BrainProject/UnityTemp

Public Properties

Property Type Description
backgroundSprite UnityEngine.GameObject
connectedComponents HashSet>
numberPieces int
pieces PuzzlePiece>.Dictionary
puzzleImage UnityEngine.Texture2D
shader UnityEngine.Shader
targetImage Image

Public Methods

Method Description
CheckPossibleConnection ( GameObject puzzleObject ) : bool
Start ( ) : void
Update ( ) : void

Private Methods

Method Description
CheckVictory ( ) : bool
EndGame ( ) : void
placePuzzlePieces ( ) : void
setOrthographicCamera ( ) : void

Method Details

CheckPossibleConnection() public method

public CheckPossibleConnection ( GameObject puzzleObject ) : bool
puzzleObject UnityEngine.GameObject
return bool

Start() public method

public Start ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

backgroundSprite public_oe property

The background sprite
public GameObject,UnityEngine backgroundSprite
return 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
return HashSet>

numberPieces public_oe property

number of puzzle pieces
public int numberPieces
return 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
return PuzzlePiece>.Dictionary

puzzleImage public_oe property

texture of image to complete in puzzle
public Texture2D,UnityEngine puzzleImage
return UnityEngine.Texture2D

shader public_oe property

public Shader,UnityEngine shader
return UnityEngine.Shader

targetImage public_oe property

indicates whether game was won or not
public Image targetImage
return Image