C# Class PuzzleManager, RoverGame

Inheritance: MonoBehaviour
Exibir arquivo Open project: Stumpstump/RoverGame Class Usage Examples

Public Properties

Property Type Description
Moves int
backButtonImage Image,
beginDrawEffect UnityEngine.AudioClip
beginGridCell GridCell,
beginWireCount int
beginWireCounter Transform
beginWireIngredient Ingredient,
cachedSoundSource SoundSource,
cellCompleteColor Color
cellContentPrefab GameObject
cellStartColor Color
cellTransColor Color
clickMoving bool
connectedSFX UnityEngine.AudioClip
contentCellPrefab GameObject
currentGridCell GridCell,
currentLevel Level,
currentLine Line,
currentRayCell Transform
draggingElement GameObject
draggingElementPrefab GameObject
draggingElementSpriteRenderer SpriteRenderer
drawDraggingElement bool
drawShortedEffect AudioClip
grid GameObject
gridBottomPivotTransform Transform
gridCellPrefab GameObject
gridCells GridCell[]
gridContentsTransform Transform
gridLinePrefab GameObject
gridLines Line[]
gridLinesTransfrom Transform
gridSize Vector2
gridTopPivotTransform Transform
hits RaycastHit[]
isRunning bool
levelLockedSFX AudioClip
levelText Text
lineDrawEffect AudioClip
mainCamera Camera
missionText Text
movements int
nextButtonImage Image
numberOfColumns int
numberOfRows int
pairCell GridCell
pairHoverEffect AudioClip
pairSparks GameObject
playerRay Ray
previousGridCell GridCell
previousRayCell Transform
pulsateColor Color
pulsateDelay float
pulsateGrid bool
pulseGridTime float
puzzleCompleteEffect AudioClip
rayCellChange bool
resetLineEffect AudioClip
tempCollider2D Collider2D
tempCollider3D Collider
tempColor Color
tempPoint Vector3
tempScale Vector3
tempSpriteRendererd Image
timer Timer
waterBubbleSFX AudioClip
wirePairCounter GameObject
worldLinePrefab GameObject

Public Methods

Method Description
Awake ( ) : void
Close ( ) : void
EnoughWiresOfType ( ) : bool
InitializePuzzle ( GameObject puzzle_Canvas ) : void

When the GameObject becomes visible

NextLevel ( ) : void

Go to the next level.

OnDisable ( ) : void

When the GameObject becomes invisible.

PreviousLevel ( ) : void

Back to the previous level.

PulsateWait ( ) : IEnumerator
RefreshGrid ( ) : void

Refreshs(Reset) the grid.

RunPuzzle ( ) : void
Update ( ) : void

Private Methods

Method Description
BuildTheGrid ( ) : void

Build the grid.

CheckForPair ( RaycastHit hitter ) : bool
CheckLevelComplete ( ) : void

Checks Wheter the level is completed.

Cleanup ( bool completed ) : void
CreateDraggingElement ( Color color, Vector3 scale ) : void

Creates the dragging element.

CreateGridLine ( float lineWidth, Color lineColor, string name, int index ) : void

Setting up Grid Lines

CreateNewLevel ( ) : void

Create a new level.

CreateWireLine ( Color lineColor, string name, int index ) : void
DelayRun ( ) : IEnumerator
DrawDraggingElement ( Vector3 clickPosition ) : void

Draw(Drag) the dragging element.

GridCellClickBegan ( ) : void

When a click(touch) began on the GridCell.

GridCellClickMoved ( ) : void

When a click(touch) moved over the GridCell.

IncreaseMovements ( ) : void

Increase the movements counter.

PulsateGrid ( ) : void
RayCast ( ClickType clickType ) : void

Raycast the click (touch) on the screen.

Release ( Line, line ) : void

On Click Release event.

RemoveInventoryWires ( ) : void
ResetGameContents ( ) : void

Resets the game contents.

SetEndMoves ( ) : void
SetGridPairIngredient ( GridCell, cell, Level, wireType ) : void
SettingUpNextBackAlpha ( ) : void

Setting up alpha value for the next and back buttons.

SettingUpObstacles ( ) : void
SettingUpPairs ( ) : void

Setting up the cells pairs.

Method Details

Awake() public method

public Awake ( ) : void
return void

Close() public method

public Close ( ) : void
return void

EnoughWiresOfType() public method

public EnoughWiresOfType ( ) : bool
return bool

InitializePuzzle() public method

When the GameObject becomes visible
public InitializePuzzle ( GameObject puzzle_Canvas ) : void
puzzle_Canvas GameObject
return void

NextLevel() public method

Go to the next level.
public NextLevel ( ) : void
return void

OnDisable() public method

When the GameObject becomes invisible.
public OnDisable ( ) : void
return void

PreviousLevel() public method

Back to the previous level.
public PreviousLevel ( ) : void
return void

PulsateWait() public method

public PulsateWait ( ) : IEnumerator
return IEnumerator

RefreshGrid() public method

Refreshs(Reset) the grid.
public RefreshGrid ( ) : void
return void

RunPuzzle() public method

public RunPuzzle ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

Moves public_oe property

public int Moves
return int

backButtonImage public_oe property

The back button image.
public Image, backButtonImage
return Image,

beginDrawEffect public_oe property

public AudioClip,UnityEngine beginDrawEffect
return UnityEngine.AudioClip

beginGridCell public_oe property

public GridCell, beginGridCell
return GridCell,

beginWireCount public_oe property

public int beginWireCount
return int

beginWireCounter public_oe property

public Transform beginWireCounter
return Transform

beginWireIngredient public_oe property

public Ingredient, beginWireIngredient
return Ingredient,

cachedSoundSource public_oe property

public SoundSource, cachedSoundSource
return SoundSource,

cellCompleteColor public_oe property

public Color cellCompleteColor
return Color

cellContentPrefab public_oe property

The cell content prefab.
public GameObject cellContentPrefab
return GameObject

cellStartColor public_oe property

public Color cellStartColor
return Color

cellTransColor public_oe property

public Color cellTransColor
return Color

clickMoving public_oe property

Whether the current click is moving
public bool clickMoving
return bool

connectedSFX public_oe property

The connected sound effect.
public AudioClip,UnityEngine connectedSFX
return UnityEngine.AudioClip

contentCellPrefab public_oe property

public GameObject contentCellPrefab
return GameObject

currentGridCell public_oe property

The current(selected) grid cell.
public GridCell, currentGridCell
return GridCell,

currentLevel public_oe static_oe property

The current level.
public static Level, currentLevel
return Level,

currentLine public_oe property

current line in the grid.
public Line, currentLine
return Line,

currentRayCell public_oe property

public Transform currentRayCell
return Transform

draggingElement public_oe property

The dragging element reference.
public GameObject draggingElement
return GameObject

draggingElementPrefab public_oe property

The dragging element prefab.
public GameObject draggingElementPrefab
return GameObject

draggingElementSpriteRenderer public_oe property

The dragging element sprite renderer.
public SpriteRenderer draggingElementSpriteRenderer
return SpriteRenderer

drawDraggingElement public_oe property

Whether the dragging element is rendering(dragging)
public bool drawDraggingElement
return bool

drawShortedEffect public_oe property

public AudioClip drawShortedEffect
return AudioClip

grid public_oe property

The grid.
public GameObject grid
return GameObject

gridBottomPivotTransform public_oe property

The grid bottom pivot transform.
public Transform gridBottomPivotTransform
return Transform

gridCellPrefab public_oe property

The grid cell prefab.
public GameObject gridCellPrefab
return GameObject

gridCells public_oe static_oe property

The grid cells in the grid.
public static GridCell[] gridCells
return GridCell[]

gridContentsTransform public_oe property

The grid contents transform.
public Transform gridContentsTransform
return Transform

gridLinePrefab public_oe property

The grid line prefab.
public GameObject gridLinePrefab
return GameObject

gridLines public_oe static_oe property

The grid lines in the grid.
public static Line[] gridLines
return Line[]

gridLinesTransfrom public_oe property

The grid lines transfrom.
public Transform gridLinesTransfrom
return Transform

gridSize public_oe property

The size of the grid.
public Vector2 gridSize
return Vector2

gridTopPivotTransform public_oe property

The grid top pivot transform.
public Transform gridTopPivotTransform
return Transform

hits public_oe property

public RaycastHit[] hits
return RaycastHit[]

isRunning public_oe property

Whether the GameManager is running.
public bool isRunning
return bool

levelLockedSFX public_oe property

The level locked sound effect.
public AudioClip levelLockedSFX
return AudioClip

levelText public_oe property

The level text.
public Text levelText
return Text

lineDrawEffect public_oe property

public AudioClip lineDrawEffect
return AudioClip

mainCamera public_oe property

public Camera mainCamera
return Camera

missionText public_oe property

The mission text.
public Text missionText
return Text

movements public_oe static_oe property

The movements counter.
public static int movements
return int

nextButtonImage public_oe property

The next button image.
public Image nextButtonImage
return Image

numberOfColumns public_oe static_oe property

The number of columns of the grid.
public static int numberOfColumns
return int

numberOfRows public_oe static_oe property

The number of rows of the grid.
public static int numberOfRows
return int

pairCell public_oe property

public GridCell pairCell
return GridCell

pairHoverEffect public_oe property

public AudioClip pairHoverEffect
return AudioClip

pairSparks public_oe property

public GameObject pairSparks
return GameObject

playerRay public_oe property

public Ray playerRay
return Ray

previousGridCell public_oe property

The previous grid cell.
public GridCell previousGridCell
return GridCell

previousRayCell public_oe property

public Transform previousRayCell
return Transform

pulsateColor public_oe property

public Color pulsateColor
return Color

pulsateDelay public_oe property

public float pulsateDelay
return float

pulsateGrid public_oe property

public bool pulsateGrid
return bool

pulseGridTime public_oe property

public float pulseGridTime
return float

puzzleCompleteEffect public_oe property

public AudioClip puzzleCompleteEffect
return AudioClip

rayCellChange public_oe property

public bool rayCellChange
return bool

resetLineEffect public_oe property

public AudioClip resetLineEffect
return AudioClip

tempCollider2D public_oe property

Temp collider 2d.
public Collider2D tempCollider2D
return Collider2D

tempCollider3D public_oe property

Temp collider 2d.
public Collider tempCollider3D
return Collider

tempColor public_oe property

Temp color.
public Color tempColor
return Color

tempPoint public_oe property

Temp point.
public Vector3 tempPoint
return Vector3

tempScale public_oe property

Temp scale.
public Vector3 tempScale
return Vector3

tempSpriteRendererd public_oe property

Temporary sprite renderer.
public Image tempSpriteRendererd
return Image

timer public_oe property

The timer reference.
public Timer timer
return Timer

waterBubbleSFX public_oe property

The water bubble sound effect.
public AudioClip waterBubbleSFX
return AudioClip

wirePairCounter public_oe property

public GameObject wirePairCounter
return GameObject

worldLinePrefab public_oe property

public GameObject worldLinePrefab
return GameObject