C# 클래스 UICamera, Hero.Coli

상속: MonoBehaviour
파일 보기 프로젝트 열기: CyberCRI/Hero.Coli 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
allowMultiTouch bool
cancelKey0 KeyCode,
cancelKey1 KeyCode,
clipRaycasts bool
current UICamera,
currentCamera Camera
currentTouch MouseOrTouch
currentTouchID int
debug bool
eventReceiverMask LayerMask
fallThrough GameObject
genericEventHandler GameObject
horizontalAxisName string
hoveredObject GameObject
inputHasFocus bool
lastHit UnityEngine.RaycastHit
lastTouchPosition Vector2
mouseClickThreshold float
mouseDragThreshold float
onCustomInput OnCustomInput
rangeDistance float
scrollAxisName string
showTooltips bool
stickyPress bool
stickyTooltip bool
submitKey0 KeyCode,
submitKey1 KeyCode,
tooltipDelay float
touchClickThreshold float
touchDragThreshold float
useController bool
useKeyboard bool
useMouse bool
useTouch bool
verticalAxisName string

Private Properties

프로퍼티 타입 설명
CompareFunc int
GetDirection int
GetDirection int
GetDirection int
Highlight void
IsVisible bool

공개 메소드들

메소드 설명
Awake ( ) : void

Add this camera to the list.

FindCameraForLayer ( int layer ) : UICamera,

Find the camera responsible for handling events on objects of the specified layer.

FixedUpdate ( ) : void

Update the object under the mouse if we're not using touch-based input.

GetTouch ( int id ) : MouseOrTouch

Get or create a touch event.

IsHighlighted ( GameObject go ) : bool

Returns whether the widget should be currently highlighted as far as the UICamera knows.

Notify ( GameObject go, string funcName, object obj ) : void

Generic notification function. Used in place of SendMessage to shorten the code and allow for more than one receiver.

OnApplicationQuit ( ) : void

Clear the list on application quit (also when Play mode is exited)

OnDestroy ( ) : void

Remove this camera from the list.

OnGUI ( ) : void
ProcessMouse ( ) : void

Update mouse input.

ProcessOthers ( ) : void

Process keyboard and joystick events.

ProcessTouch ( bool pressed, bool unpressed ) : void

Process the events of the specified touch.

ProcessTouches ( ) : void

Update touch-based events.

Raycast ( Vector3 inPos, RaycastHit &hit ) : bool

Returns the object under the specified position.

RemoveTouch ( int id ) : void

Remove a touch event from the list.

ShowTooltip ( bool val ) : void

Show or hide the tooltip.

Update ( ) : void

Check the input and send out appropriate events.

비공개 메소드들

메소드 설명
CompareFunc ( UICamera, a, UICamera, b ) : int

Static comparison function used for sorting.

GetDirection ( KeyCode, up, KeyCode, down ) : int

Using the keyboard will result in 1 or -1, depending on whether up or down keys have been pressed.

GetDirection ( KeyCode, up0, KeyCode, up1, KeyCode, down0, KeyCode, down1 ) : int

Using the keyboard will result in 1 or -1, depending on whether up or down keys have been pressed.

GetDirection ( string axis ) : int

Using the joystick to move the UI results in 1 or -1 if the threshold has been passed, mimicking up/down keys.

Highlight ( GameObject go, bool highlighted ) : void

Apply or remove highlighted (hovered) state from the specified object.

IsVisible ( RaycastHit &hit ) : bool

Helper function to check if the specified hit is visible by the panel.

메소드 상세

Awake() 공개 메소드

Add this camera to the list.
public Awake ( ) : void
리턴 void

FindCameraForLayer() 정적인 공개 메소드

Find the camera responsible for handling events on objects of the specified layer.
static public FindCameraForLayer ( int layer ) : UICamera,
layer int
리턴 UICamera,

FixedUpdate() 공개 메소드

Update the object under the mouse if we're not using touch-based input.
public FixedUpdate ( ) : void
리턴 void

GetTouch() 정적인 공개 메소드

Get or create a touch event.
static public GetTouch ( int id ) : MouseOrTouch
id int
리턴 MouseOrTouch

IsHighlighted() 정적인 공개 메소드

Returns whether the widget should be currently highlighted as far as the UICamera knows.
static public IsHighlighted ( GameObject go ) : bool
go GameObject
리턴 bool

Notify() 정적인 공개 메소드

Generic notification function. Used in place of SendMessage to shorten the code and allow for more than one receiver.
static public Notify ( GameObject go, string funcName, object obj ) : void
go GameObject
funcName string
obj object
리턴 void

OnApplicationQuit() 공개 메소드

Clear the list on application quit (also when Play mode is exited)
public OnApplicationQuit ( ) : void
리턴 void

OnDestroy() 공개 메소드

Remove this camera from the list.
public OnDestroy ( ) : void
리턴 void

OnGUI() 공개 메소드

public OnGUI ( ) : void
리턴 void

ProcessMouse() 공개 메소드

Update mouse input.
public ProcessMouse ( ) : void
리턴 void

ProcessOthers() 공개 메소드

Process keyboard and joystick events.
public ProcessOthers ( ) : void
리턴 void

ProcessTouch() 공개 메소드

Process the events of the specified touch.
public ProcessTouch ( bool pressed, bool unpressed ) : void
pressed bool
unpressed bool
리턴 void

ProcessTouches() 공개 메소드

Update touch-based events.
public ProcessTouches ( ) : void
리턴 void

Raycast() 정적인 공개 메소드

Returns the object under the specified position.
static public Raycast ( Vector3 inPos, RaycastHit &hit ) : bool
inPos Vector3
hit UnityEngine.RaycastHit
리턴 bool

RemoveTouch() 정적인 공개 메소드

Remove a touch event from the list.
static public RemoveTouch ( int id ) : void
id int
리턴 void

ShowTooltip() 공개 메소드

Show or hide the tooltip.
public ShowTooltip ( bool val ) : void
val bool
리턴 void

Update() 공개 메소드

Check the input and send out appropriate events.
public Update ( ) : void
리턴 void

프로퍼티 상세

allowMultiTouch 공개적으로 프로퍼티

Whether multi-touch is allowed.
public bool allowMultiTouch
리턴 bool

cancelKey0 공개적으로 프로퍼티

public KeyCode, cancelKey0
리턴 KeyCode,

cancelKey1 공개적으로 프로퍼티

public KeyCode, cancelKey1
리턴 KeyCode,

clipRaycasts 공개적으로 프로퍼티

Whether raycast events will be clipped just like widgets. This essentially means that clicking on a collider that happens to have been clipped will not produce a hit. Note that having this enabled will slightly reduce performance.
public bool clipRaycasts
리턴 bool

current 정적으로 공개적으로 프로퍼티

UICamera that sent out the event.
static public UICamera, current
리턴 UICamera,

currentCamera 정적으로 공개적으로 프로퍼티

Last camera active prior to sending out the event. This will always be the camera that actually sent out the event.
static public Camera currentCamera
리턴 Camera

currentTouch 정적으로 공개적으로 프로퍼티

Current touch, set before any event function gets called.
static public MouseOrTouch currentTouch
리턴 MouseOrTouch

currentTouchID 정적으로 공개적으로 프로퍼티

ID of the touch or mouse operation prior to sending out the event. Mouse ID is '-1' for left, '-2' for right mouse button, '-3' for middle.
static public int currentTouchID
리턴 int

debug 공개적으로 프로퍼티

If 'true', currently hovered object will be shown in the top left corner.
public bool debug
리턴 bool

eventReceiverMask 공개적으로 프로퍼티

Which layers will receive events.
public LayerMask eventReceiverMask
리턴 LayerMask

fallThrough 정적으로 공개적으로 프로퍼티

If events don't get handled, they will be forwarded to this game object.
static public GameObject fallThrough
리턴 GameObject

genericEventHandler 정적으로 공개적으로 프로퍼티

If set, this game object will receive all events regardless of whether they were handled or not.
static public GameObject genericEventHandler
리턴 GameObject

horizontalAxisName 공개적으로 프로퍼티

Name of the axis used to send left and right key events.
public string horizontalAxisName
리턴 string

hoveredObject 정적으로 공개적으로 프로퍼티

The object hit by the last Raycast that was the result of a mouse or touch event.
static public GameObject hoveredObject
리턴 GameObject

inputHasFocus 정적으로 공개적으로 프로퍼티

Whether an input field currently has focus.
static public bool inputHasFocus
리턴 bool

lastHit 정적으로 공개적으로 프로퍼티

Last raycast hit prior to sending out the event. This is useful if you want detailed information about what was actually hit in your OnClick, OnHover, and other event functions.
static public RaycastHit,UnityEngine lastHit
리턴 UnityEngine.RaycastHit

lastTouchPosition 정적으로 공개적으로 프로퍼티

Position of the last touch (or mouse) event.
static public Vector2 lastTouchPosition
리턴 Vector2

mouseClickThreshold 공개적으로 프로퍼티

How far the mouse is allowed to move in pixels before it's no longer considered for click events, if the click notification is based on delta.
public float mouseClickThreshold
리턴 float

mouseDragThreshold 공개적으로 프로퍼티

How much the mouse has to be moved after pressing a button before it starts to send out drag events.
public float mouseDragThreshold
리턴 float

onCustomInput 정적으로 공개적으로 프로퍼티

Custom input processing logic, if desired. For example: WP7 touches. Use UICamera.current to get the current camera.
static public OnCustomInput onCustomInput
리턴 OnCustomInput

rangeDistance 공개적으로 프로퍼티

Raycast range distance. By default it's as far as the camera can see.
public float rangeDistance
리턴 float

scrollAxisName 공개적으로 프로퍼티

Name of the axis used for scrolling.
public string scrollAxisName
리턴 string

showTooltips 정적으로 공개적으로 프로퍼티

Whether tooltips will be shown or not.
static public bool showTooltips
리턴 bool

stickyPress 공개적으로 프로퍼티

If 'true', once a press event is started on some object, that object will be the only one that will be receiving future events until the press event is finally released, regardless of where that happens. If 'false', the press event won't be locked to the original object, and other objects will be receiving OnPress(true) and OnPress(false) events as the touch enters and leaves their area.
public bool stickyPress
리턴 bool

stickyTooltip 공개적으로 프로퍼티

Whether the tooltip will disappear as soon as the mouse moves (false) or only if the mouse moves outside of the widget's area (true).
public bool stickyTooltip
리턴 bool

submitKey0 공개적으로 프로퍼티

Various keys used by the camera.
public KeyCode, submitKey0
리턴 KeyCode,

submitKey1 공개적으로 프로퍼티

public KeyCode, submitKey1
리턴 KeyCode,

tooltipDelay 공개적으로 프로퍼티

How long of a delay to expect before showing the tooltip.
public float tooltipDelay
리턴 float

touchClickThreshold 공개적으로 프로퍼티

How far the touch is allowed to move in pixels before it's no longer considered for click events, if the click notification is based on delta.
public float touchClickThreshold
리턴 float

touchDragThreshold 공개적으로 프로퍼티

How much the mouse has to be moved after pressing a button before it starts to send out drag events.
public float touchDragThreshold
리턴 float

useController 공개적으로 프로퍼티

Whether the joystick and controller events will be processed.
public bool useController
리턴 bool

useKeyboard 공개적으로 프로퍼티

Whether the keyboard events will be processed.
public bool useKeyboard
리턴 bool

useMouse 공개적으로 프로퍼티

Whether the mouse input is used.
public bool useMouse
리턴 bool

useTouch 공개적으로 프로퍼티

Whether the touch-based input is used.
public bool useTouch
리턴 bool

verticalAxisName 공개적으로 프로퍼티

Name of the axis used to send up and down key events.
public string verticalAxisName
리턴 string