Свойство | Type | Description | |
---|---|---|---|
cursorAttack | |||
cursorBuild | |||
cursorCaptureRay | |||
cursorGetInside | |||
cursorGetOut | |||
cursorNormal | |||
cursorObject | Transform | ||
cursorRecycleEnable | |||
cursorReprogramEnable | |||
cursorSabotageEnable | |||
cursorWalk | |||
cursorWalkNotOk | |||
gameBarBottom | float | ||
gameBarTop | float | ||
mouseHitPointNow | Vector3 | ||
selectedObject | Transform | ||
targetPosition | Vector3 |
Méthode | Description | |
---|---|---|
DeselectedObject ( ) : void |
Called from an external script, when a unit is deselected
|
|
GetSelectedObject ( ) : Transform |
Return the transform of the object currently selected, if any
|
|
IWantToSelectAPosition ( ) : void |
Executed when a script wants to receive a position when a mouse button is clicked
|
|
PositionIsAlreadySelected ( ) : bool |
Used after IWantToSelectAPosition by another script, so it will know when something is clicked and a position is selected
|
|
RemoveCursor ( ) : void |
Removes the cursor projector, destroying its object Used when we have deselected a unit
|
|
SelectObject ( Transform targetObject ) : void | ||
WhatIsThePositionSelected ( ) : Vector3 |
Used in conjuction with IWantToSelectAPosition and PositionIsAlreadySelected. If the position is already select, them polls this script to know what is this position
|
Méthode | Description | |
---|---|---|
Awake ( ) : void | ||
CheckLeftMouseClick ( ) : void |
Execute when the player presses the left mouse button Behaviours: select an unit, deselect-it if clicked in the terrain
|
|
CheckRightMouseClick ( ) : void |
Execute when the player presses the right mouse button Behaviours: when a movable unit is selected, select where it should walk to
|
|
DoCheatingStuff ( ) : void |
Do some cheats, for development purposes only
|
|
GetWhatIClicked ( ) : Transform |
When the player presses the mouse button, check whatever is under the mouse cursor through a raycast
|
|
MouseOver ( ) : void |
Checks the objects under the mouse cursor, showing its info in the info panel Actually, this is the main function of this script: it analyzes the context and set the mouse state and cursor accordingly
|
|
OnGUI ( ) : void |
For now, the OnGUI only draws the custom mouse cursor
|
|
ShowSelectedPositionWithAProjector ( Vector3 position, float timeToShow ) : IEnumerator |
When the player select a position to walk to, we show a cursor in the ground for visual aid
|
|
Start ( ) : void | ||
Update ( ) : void |
public PositionIsAlreadySelected ( ) : bool | ||
Résultat | bool |
public SelectObject ( Transform targetObject ) : void | ||
targetObject | Transform | |
Résultat | void |
public WhatIsThePositionSelected ( ) : Vector3 | ||
Résultat | Vector3 |
public Texture2D,UnityEngine cursorAttack | ||
Résultat |
public Texture2D,UnityEngine cursorBuild | ||
Résultat |
public Texture2D,UnityEngine cursorCaptureRay | ||
Résultat |
public Texture2D,UnityEngine cursorGetInside | ||
Résultat |
public Texture2D,UnityEngine cursorGetOut | ||
Résultat |
public Texture2D,UnityEngine cursorNormal | ||
Résultat |
public Texture2D,UnityEngine cursorRecycleEnable | ||
Résultat |
public Texture2D,UnityEngine cursorReprogramEnable | ||
Résultat |
public Texture2D,UnityEngine cursorSabotageEnable | ||
Résultat |
public Texture2D,UnityEngine cursorWalk | ||
Résultat |
public Texture2D,UnityEngine cursorWalkNotOk | ||
Résultat |
public static Vector3 mouseHitPointNow | ||
Résultat | Vector3 |