C# Class ClickHandler, Gold-Rush

Inheritance: MonoBehaviour
Datei anzeigen Open project: eric-kansas/Gold-Rush Class Usage Examples

Public Properties

Property Type Description
bodyColor List
indexToMove int
stakePrefab GameObject
tempPlayer Player,

Public Methods

Method Description
PositionToVector2 ( Vector3 pos ) : Vector2
Start ( ) : void
Vector2ToPosition ( Vector2 v, float yVal ) : Vector3
findHandPosition ( int index ) : Vector3
movePlayer ( ) : void

Helper function - Actually moves the player

myUpdate ( ) : void
prepareBump ( ) : void
resetStaking ( ) : void

Private Methods

Method Description
bumpStake ( RaycastHit hit ) : void
gameClick ( RaycastHit hit ) : void

Calls helper function based on curent game state and turn

mineClick ( RaycastHit hit ) : void
moveClick ( RaycastHit hit ) : void

Checks if the click is valid, then calls the MovePlayer helper function

moveOpponent ( RaycastHit hit ) : void
setupClick ( RaycastHit hit ) : void
stakeClickMiningPhase ( RaycastHit hit ) : void
stakeClickProspectingPhase ( RaycastHit hit ) : void

Method Details

PositionToVector2() public method

public PositionToVector2 ( Vector3 pos ) : Vector2
pos Vector3
return Vector2

Start() public method

public Start ( ) : void
return void

Vector2ToPosition() public method

public Vector2ToPosition ( Vector2 v, float yVal ) : Vector3
v Vector2
yVal float
return Vector3

findHandPosition() public method

public findHandPosition ( int index ) : Vector3
index int
return Vector3

movePlayer() public method

Helper function - Actually moves the player
public movePlayer ( ) : void
return void

myUpdate() public method

public myUpdate ( ) : void
return void

prepareBump() public method

public prepareBump ( ) : void
return void

resetStaking() public method

public resetStaking ( ) : void
return void

Property Details

bodyColor public_oe property

public List bodyColor
return List

indexToMove public_oe property

public int indexToMove
return int

stakePrefab public_oe property

public GameObject stakePrefab
return GameObject

tempPlayer public_oe property

public Player, tempPlayer
return Player,