C# Класс PuzzleManager, RoverGame

Наследование: MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

Awake() публичный Метод

public Awake ( ) : void
Результат void

Close() публичный Метод

public Close ( ) : void
Результат void

EnoughWiresOfType() публичный Метод

public EnoughWiresOfType ( ) : bool
Результат bool

InitializePuzzle() публичный Метод

When the GameObject becomes visible
public InitializePuzzle ( GameObject puzzle_Canvas ) : void
puzzle_Canvas GameObject
Результат void

NextLevel() публичный Метод

Go to the next level.
public NextLevel ( ) : void
Результат void

OnDisable() публичный Метод

When the GameObject becomes invisible.
public OnDisable ( ) : void
Результат void

PreviousLevel() публичный Метод

Back to the previous level.
public PreviousLevel ( ) : void
Результат void

PulsateWait() публичный Метод

public PulsateWait ( ) : IEnumerator
Результат IEnumerator

RefreshGrid() публичный Метод

Refreshs(Reset) the grid.
public RefreshGrid ( ) : void
Результат void

RunPuzzle() публичный Метод

public RunPuzzle ( ) : void
Результат void

Update() публичный Метод

public Update ( ) : void
Результат void

Описание свойств

Moves публичное свойство

public int Moves
Результат int

backButtonImage публичное свойство

The back button image.
public Image, backButtonImage
Результат Image,

beginDrawEffect публичное свойство

public AudioClip,UnityEngine beginDrawEffect
Результат UnityEngine.AudioClip

beginGridCell публичное свойство

public GridCell, beginGridCell
Результат GridCell,

beginWireCount публичное свойство

public int beginWireCount
Результат int

beginWireCounter публичное свойство

public Transform beginWireCounter
Результат Transform

beginWireIngredient публичное свойство

public Ingredient, beginWireIngredient
Результат Ingredient,

cachedSoundSource публичное свойство

public SoundSource, cachedSoundSource
Результат SoundSource,

cellCompleteColor публичное свойство

public Color cellCompleteColor
Результат Color

cellContentPrefab публичное свойство

The cell content prefab.
public GameObject cellContentPrefab
Результат GameObject

cellStartColor публичное свойство

public Color cellStartColor
Результат Color

cellTransColor публичное свойство

public Color cellTransColor
Результат Color

clickMoving публичное свойство

Whether the current click is moving
public bool clickMoving
Результат bool

connectedSFX публичное свойство

The connected sound effect.
public AudioClip,UnityEngine connectedSFX
Результат UnityEngine.AudioClip

contentCellPrefab публичное свойство

public GameObject contentCellPrefab
Результат GameObject

currentGridCell публичное свойство

The current(selected) grid cell.
public GridCell, currentGridCell
Результат GridCell,

currentLevel публичное статическое свойство

The current level.
public static Level, currentLevel
Результат Level,

currentLine публичное свойство

current line in the grid.
public Line, currentLine
Результат Line,

currentRayCell публичное свойство

public Transform currentRayCell
Результат Transform

draggingElement публичное свойство

The dragging element reference.
public GameObject draggingElement
Результат GameObject

draggingElementPrefab публичное свойство

The dragging element prefab.
public GameObject draggingElementPrefab
Результат GameObject

draggingElementSpriteRenderer публичное свойство

The dragging element sprite renderer.
public SpriteRenderer draggingElementSpriteRenderer
Результат SpriteRenderer

drawDraggingElement публичное свойство

Whether the dragging element is rendering(dragging)
public bool drawDraggingElement
Результат bool

drawShortedEffect публичное свойство

public AudioClip drawShortedEffect
Результат AudioClip

grid публичное свойство

The grid.
public GameObject grid
Результат GameObject

gridBottomPivotTransform публичное свойство

The grid bottom pivot transform.
public Transform gridBottomPivotTransform
Результат Transform

gridCellPrefab публичное свойство

The grid cell prefab.
public GameObject gridCellPrefab
Результат GameObject

gridCells публичное статическое свойство

The grid cells in the grid.
public static GridCell[] gridCells
Результат GridCell[]

gridContentsTransform публичное свойство

The grid contents transform.
public Transform gridContentsTransform
Результат Transform

gridLinePrefab публичное свойство

The grid line prefab.
public GameObject gridLinePrefab
Результат GameObject

gridLines публичное статическое свойство

The grid lines in the grid.
public static Line[] gridLines
Результат Line[]

gridLinesTransfrom публичное свойство

The grid lines transfrom.
public Transform gridLinesTransfrom
Результат Transform

gridSize публичное свойство

The size of the grid.
public Vector2 gridSize
Результат Vector2

gridTopPivotTransform публичное свойство

The grid top pivot transform.
public Transform gridTopPivotTransform
Результат Transform

hits публичное свойство

public RaycastHit[] hits
Результат RaycastHit[]

isRunning публичное свойство

Whether the GameManager is running.
public bool isRunning
Результат bool

levelLockedSFX публичное свойство

The level locked sound effect.
public AudioClip levelLockedSFX
Результат AudioClip

levelText публичное свойство

The level text.
public Text levelText
Результат Text

lineDrawEffect публичное свойство

public AudioClip lineDrawEffect
Результат AudioClip

mainCamera публичное свойство

public Camera mainCamera
Результат Camera

missionText публичное свойство

The mission text.
public Text missionText
Результат Text

movements публичное статическое свойство

The movements counter.
public static int movements
Результат int

nextButtonImage публичное свойство

The next button image.
public Image nextButtonImage
Результат Image

numberOfColumns публичное статическое свойство

The number of columns of the grid.
public static int numberOfColumns
Результат int

numberOfRows публичное статическое свойство

The number of rows of the grid.
public static int numberOfRows
Результат int

pairCell публичное свойство

public GridCell pairCell
Результат GridCell

pairHoverEffect публичное свойство

public AudioClip pairHoverEffect
Результат AudioClip

pairSparks публичное свойство

public GameObject pairSparks
Результат GameObject

playerRay публичное свойство

public Ray playerRay
Результат Ray

previousGridCell публичное свойство

The previous grid cell.
public GridCell previousGridCell
Результат GridCell

previousRayCell публичное свойство

public Transform previousRayCell
Результат Transform

pulsateColor публичное свойство

public Color pulsateColor
Результат Color

pulsateDelay публичное свойство

public float pulsateDelay
Результат float

pulsateGrid публичное свойство

public bool pulsateGrid
Результат bool

pulseGridTime публичное свойство

public float pulseGridTime
Результат float

puzzleCompleteEffect публичное свойство

public AudioClip puzzleCompleteEffect
Результат AudioClip

rayCellChange публичное свойство

public bool rayCellChange
Результат bool

resetLineEffect публичное свойство

public AudioClip resetLineEffect
Результат AudioClip

tempCollider2D публичное свойство

Temp collider 2d.
public Collider2D tempCollider2D
Результат Collider2D

tempCollider3D публичное свойство

Temp collider 2d.
public Collider tempCollider3D
Результат Collider

tempColor публичное свойство

Temp color.
public Color tempColor
Результат Color

tempPoint публичное свойство

Temp point.
public Vector3 tempPoint
Результат Vector3

tempScale публичное свойство

Temp scale.
public Vector3 tempScale
Результат Vector3

tempSpriteRendererd публичное свойство

Temporary sprite renderer.
public Image tempSpriteRendererd
Результат Image

timer публичное свойство

The timer reference.
public Timer timer
Результат Timer

waterBubbleSFX публичное свойство

The water bubble sound effect.
public AudioClip waterBubbleSFX
Результат AudioClip

wirePairCounter публичное свойство

public GameObject wirePairCounter
Результат GameObject

worldLinePrefab публичное свойство

public GameObject worldLinePrefab
Результат GameObject