This wrapper class keeps references intact if you switch between the compiled assembly and source code versions of the original class. More...
Additional Inherited Members | |
Public Types inherited from PixelCrushers.DialogueSystem.Selector | |
enum | SelectAt { CenterOfScreen , MousePosition , CustomPosition } |
Specifies how to target: center of screen or under the mouse cursor. More... | |
enum | DistanceFrom { Camera , GameObject , ActorTransform } |
Specifies whether to compute range from the targeted object (distance to the camera or distance to the selector's game object). More... | |
enum | Dimension { In2D , In3D } |
Specifies whether to do 2D or 3D raycasts. More... | |
Public Member Functions inherited from PixelCrushers.DialogueSystem.Selector | |
virtual void | Start () |
virtual void | UseCurrentSelection () |
Calls OnUse on the current selection. | |
virtual void | SetCurrentUsable (Usable usable) |
virtual void | OnGUI () |
If useDefaultGUI is true and a usable object has been targeted, this method draws a selection message and targeting reticle. | |
virtual void | OnDrawGizmos () |
Draws raycast result gizmos. | |
Public Attributes inherited from PixelCrushers.DialogueSystem.Selector | |
SelectAt | selectAt = SelectAt.CenterOfScreen |
How to target (center of screen or under mouse cursor). | |
LayerMask | layerMask = DefaultLayer |
The layer mask to use when targeting objects. | |
DistanceFrom | distanceFrom = DistanceFrom.Camera |
How to compute range to targeted object. | |
float | maxSelectionDistance = 30f |
The max selection distance. | |
Dimension | runRaycasts = Dimension.In3D |
Specifies whether to run 2D or 3D raycasts. | |
bool | raycastAll = false |
Set true to check all objects within the raycast range for usables. | |
bool | useDefaultGUI = true |
If true , uses a default OnGUI to display a selection message and targeting reticle. | |
GUISkin | guiSkin |
The GUI skin to use for the target's information (name and use message). | |
string | guiStyleName = "label" |
The name of the GUI style in the skin. | |
TextAnchor | alignment = TextAnchor.UpperCenter |
The text alignment. | |
TextStyle | textStyle = TextStyle.Shadow |
The text style for the text. | |
Color | textStyleColor = Color.black |
The color of the text style's outline or shadow. | |
Color | inRangeColor = Color.yellow |
The color of the information labels when the target is in range. | |
Color | outOfRangeColor = Color.gray |
The color of the information labels when the target is out of range. | |
Reticle | reticle |
The reticle images. | |
KeyCode | useKey = KeyCode.Space |
The key that sends an OnUse message. | |
string | useButton = "Fire2" |
The button that sends an OnUse message. | |
string | defaultUseMessage = "(spacebar to interact)" |
The default use message. | |
bool | broadcastToChildren = true |
If ticked, the OnUse message is broadcast to the usable object's children. | |
Transform | actorTransform = null |
The actor transform to send with OnUse. | |
string | tooFarMessage = string.Empty |
If set, show this alert message if attempt to use something beyond its usable range. | |
UsableUnityEvent | onSelectedUsable = new UsableUnityEvent() |
UsableUnityEvent | onDeselectedUsable = new UsableUnityEvent() |
UnityEvent | tooFarEvent = new UnityEvent() |
The too far event handler. | |
bool | debug = false |
If true , draws gizmos. | |
Protected Member Functions inherited from PixelCrushers.DialogueSystem.Selector | |
virtual void | Reset () |
virtual void | OnEnable () |
virtual void | OnDisable () |
virtual void | Update () |
Runs a raycast to see what's under the selection point. | |
virtual void | Run2DRaycast () |
virtual void | Run3DRaycast () |
void | OnSelectedUsableObject (Usable usable) |
void | OnDeselectedUsableObject (Usable usable) |
virtual void | DeselectTarget () |
virtual void | OnUsableDisabled (Usable usable) |
virtual bool | IsUseButtonDown () |
virtual bool | IsUsingDefaultInputManager () |
virtual Vector3 | GetSelectionPoint () |
void | SetGuiStyle () |
Protected Attributes inherited from PixelCrushers.DialogueSystem.Selector | |
GameObject | selection = null |
Usable | usable = null |
GameObject | clickedDownOn = null |
string | heading = string.Empty |
string | useMessage = string.Empty |
float | distance = 0 |
GUIStyle | guiStyle = null |
float | guiStyleLineHeight = 16f |
Ray | lastRay = new Ray() |
RaycastHit | lastHit = new RaycastHit() |
RaycastHit[] | lastHits = null |
int | numLastHits = 0 |
RaycastHit2D[] | lastHits2D = null |
bool | hasReportedInvalidCamera = false |
bool | hasCheckedDefaultInputManager = false |
bool | isUsingDefaultInputManager = true |
Static Protected Attributes inherited from PixelCrushers.DialogueSystem.Selector | |
const int | MaxHits = 100 |
Properties inherited from PixelCrushers.DialogueSystem.Selector | |
Vector3 | CustomPosition [get, set] |
Gets or sets the custom position used when the selectAt is set to SelectAt.CustomPosition. | |
Usable | CurrentUsable [get, set] |
Gets the current selection. | |
float | CurrentDistance [get] |
Gets the distance from the current usable. | |
GUIStyle | GuiStyle [get] |
Gets the GUI style. | |
UnityEngine.EventSystems.EventSystem | eventSystem [get, set] |
Properties inherited from PixelCrushers.IEventSystemUser | |
Events inherited from PixelCrushers.DialogueSystem.Selector | |
SelectedUsableObjectDelegate | SelectedUsableObject = null |
Occurs when the selector has targeted a usable object. | |
DeselectedUsableObjectDelegate | DeselectedUsableObject = null |
Occurs when the selector has untargeted a usable object. | |
System.Action | Enabled = null |
System.Action | Disabled = null |
This wrapper class keeps references intact if you switch between the compiled assembly and source code versions of the original class.