C# 클래스 EasyTouch, CapsUnity

This is the main class of Easytouch engine. For add Easy Touch to your scene It is a fake singleton, so you can simply access their settings via a script with all static methods or with the inspector.
상속: MonoBehaviour
파일 보기 프로젝트 열기: kofight/CapsUnity 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
StationnaryTolerance float
autoSelect bool
enable bool
enable2FingersGesture bool
enablePinch bool
enableRemote bool
enableReservedArea bool
enableTwist bool
enabledNGuiMode bool
instance EasyTouch,
isExtension bool
longTapTime float
minPinchLength float
minTwistAngle float
nGUICameras List
nGUILayers LayerMask
pickableLayers LayerMask
receiverObject GameObject
reservedAreas List
reservedGuiAreas List
reservedVirtualAreas List
secondFingerTexture Texture
showGeneral bool
showGesture bool
showSecondFinger bool
showSelect bool
showTwoFinger bool
swipeKey KeyCode,
swipeTolerance float
touchCameras List
twistKey KeyCode,
useBroadcastMessage bool

공개 메소드들

메소드 설명
AddReservedArea ( Rect rec ) : void

Adds a reserved area.

AddReservedGuiArea ( Rect rec ) : void
EasyTouch ( ) : UnityEngine
GetCamera ( int index ) : Camera

Return the camera used by EasyTouch for the auto-selection.

GetCurrentPickedObject ( int fingerIndex ) : GameObject

Gets the current picked object under a specific touch

GetEnable2FingersGesture ( ) : bool

Return if 2 fingers gesture is enabled or disabled

GetEnableAutoSelect ( ) : bool

Return if auto select is enabled or disabled

GetEnablePinch ( ) : bool

Return if 2 pinch gesture is enabled or disabled

GetEnableTwist ( ) : bool

Return if 2 twist gesture is enabled or disabled

GetEnabled ( ) : bool

Return if EasyTouch is enabled or disabled.

GetFingerPosition ( int fingerIndex ) : Vector2

Gets the a specific finger position.

GetIsReservedArea ( ) : bool

Return if Reserved Area is enable or disable

GetMinPinchLength ( ) : float

Return the minimum length of the pinch.

GetMinTwistAngle ( ) : float

Gets the minimum twist angle.

GetOtherReceiverObject ( ) : GameObject

Return the other event receiver.

GetPickableLayer ( ) : LayerMask

Gets the pickable layer.

GetStationnaryTolerance ( ) : float

Return the stationnary tolerance.

GetSwipeTolerance ( ) : float

Return the swipe tolerance.

GetTouchCount ( ) : int

Return the current touches count.

GetlongTapTime ( ) : float

Return the longs the tap time.

InitEasyTouch ( ) : void
IsRectUnderTouch ( Rect rect, bool guiRect = false ) : bool

Determines if a touch is under a specified rect guiRect.

OnDrawGizmos ( ) : void
OnEnable ( ) : void
OnGUI ( ) : void
RemoveReservedArea ( Rect rec ) : void

Removes a reserved area.

RemoveReservedGuiArea ( Rect rec ) : void
ResetTouch ( int fingerIndex ) : void

Resets a specific touch.

ResetTouches ( ) : void
SetCamera ( Camera cam, bool guiCam = false ) : void

Sets the camera uses by EasyTouch to linePick for auto-selection.

SetEnable2FingersGesture ( bool enable ) : void

Enables or disables the recognize of 2 fingers gesture.

SetEnableAutoSelect ( bool enable ) : void

Enables or disables auto select.

SetEnablePinch ( bool enable ) : void

Enables or disables the recognize of pinch gesture

SetEnableTwist ( bool enable ) : void

Enables or disables the recognize of twist gesture

SetEnabled ( bool enable ) : void

Enables or disables Easy Touch.

SetIsReservedArea ( bool enable ) : void

Sets if Reserved Area is enable or disable

SetMinPinchLength ( float length ) : void

Sets the minimum length of the pinch.

SetMinTwistAngle ( float angle ) : void

Sets the minimum twist angle.

SetOtherReceiverObject ( GameObject receiver ) : void

Sets the other receiver for EasyTouch event.

SetPickableLayer ( LayerMask mask ) : void

Sets the pickable layer.

SetStationnaryTolerance ( float tolerance ) : void

Sets the stationnary tolerance.

SetSwipeTolerance ( float tolerance ) : void

Sets the swipe tolerance.

SetlongTapTime ( float time ) : void

Set the long tap time in second

Start ( ) : void
Update ( ) : void
UpdateTouches ( bool realTouch, int touchCount ) : void

비공개 메소드들

메소드 설명
CreateGesture ( int touchIndex, EventName, message, Finger, finger, float actionTime, SwipeType swipe, float swipeLength, Vector2 swipeVector ) : void
CreateGesture2Finger ( EventName, message, Vector2 startPosition, Vector2 position, Vector2 deltaPosition, float actionTime, SwipeType swipe, float swipeLength, Vector2 swipeVector, float twist, float pinch, float twoDistance ) : void
CreateStateEnd2Fingers ( GestureType gesture, Vector2 startPosition, Vector2 position, Vector2 deltaPosition, float time, bool realEnd, float fingerDistance ) : void
DeltaAngle ( Vector2 start, Vector2 end ) : float
FingerInTolerance ( Finger, finger ) : bool
GetFinger ( int finderId ) : Finger,
GetPickeGameObject ( Finger, &finger, bool twoFinger = false ) : bool
GetSwipe ( Vector2 start, Vector2 end ) : SwipeType
GetTwoFinger ( int index ) : int
IsTouchHoverNGui ( int touchIndex ) : bool
IsTouchReservedArea ( int touchIndex ) : bool
OneFinger ( int fingerIndex ) : void
RaiseEvent ( EventName, evnt, Gesture, gesture ) : void
RaiseReadyEvent ( ) : void
SendGesture ( EventName, message, Gesture, gesture ) : void
SendGesture2Finger ( EventName, message, Gesture, gesture ) : void
TwistAngle ( ) : float
TwoFinger ( ) : void

메소드 상세

AddReservedArea() 공개 정적인 메소드

Adds a reserved area.
public static AddReservedArea ( Rect rec ) : void
rec Rect /// Rec. ///
리턴 void

AddReservedGuiArea() 공개 정적인 메소드

public static AddReservedGuiArea ( Rect rec ) : void
rec Rect
리턴 void

EasyTouch() 공개 메소드

public EasyTouch ( ) : UnityEngine
리턴 UnityEngine

GetCamera() 공개 정적인 메소드

Return the camera used by EasyTouch for the auto-selection.
public static GetCamera ( int index ) : Camera
index int
리턴 Camera

GetCurrentPickedObject() 공개 정적인 메소드

Gets the current picked object under a specific touch
public static GetCurrentPickedObject ( int fingerIndex ) : GameObject
fingerIndex int /// Finger index. ///
리턴 GameObject

GetEnable2FingersGesture() 공개 정적인 메소드

Return if 2 fingers gesture is enabled or disabled
public static GetEnable2FingersGesture ( ) : bool
리턴 bool

GetEnableAutoSelect() 공개 정적인 메소드

Return if auto select is enabled or disabled
public static GetEnableAutoSelect ( ) : bool
리턴 bool

GetEnablePinch() 공개 정적인 메소드

Return if 2 pinch gesture is enabled or disabled
public static GetEnablePinch ( ) : bool
리턴 bool

GetEnableTwist() 공개 정적인 메소드

Return if 2 twist gesture is enabled or disabled
public static GetEnableTwist ( ) : bool
리턴 bool

GetEnabled() 공개 정적인 메소드

Return if EasyTouch is enabled or disabled.
public static GetEnabled ( ) : bool
리턴 bool

GetFingerPosition() 공개 정적인 메소드

Gets the a specific finger position.
public static GetFingerPosition ( int fingerIndex ) : Vector2
fingerIndex int /// Finger index. ///
리턴 Vector2

GetIsReservedArea() 공개 정적인 메소드

Return if Reserved Area is enable or disable
public static GetIsReservedArea ( ) : bool
리턴 bool

GetMinPinchLength() 공개 정적인 메소드

Return the minimum length of the pinch.
public static GetMinPinchLength ( ) : float
리턴 float

GetMinTwistAngle() 공개 정적인 메소드

Gets the minimum twist angle.
public static GetMinTwistAngle ( ) : float
리턴 float

GetOtherReceiverObject() 공개 정적인 메소드

Return the other event receiver.
public static GetOtherReceiverObject ( ) : GameObject
리턴 GameObject

GetPickableLayer() 공개 정적인 메소드

Gets the pickable layer.
public static GetPickableLayer ( ) : LayerMask
리턴 LayerMask

GetStationnaryTolerance() 공개 정적인 메소드

Return the stationnary tolerance.
public static GetStationnaryTolerance ( ) : float
리턴 float

GetSwipeTolerance() 공개 정적인 메소드

Return the swipe tolerance.
public static GetSwipeTolerance ( ) : float
리턴 float

GetTouchCount() 공개 정적인 메소드

Return the current touches count.
public static GetTouchCount ( ) : int
리턴 int

GetlongTapTime() 공개 정적인 메소드

Return the longs the tap time.
public static GetlongTapTime ( ) : float
리턴 float

InitEasyTouch() 공개 메소드

public InitEasyTouch ( ) : void
리턴 void

IsRectUnderTouch() 공개 정적인 메소드

Determines if a touch is under a specified rect guiRect.
public static IsRectUnderTouch ( Rect rect, bool guiRect = false ) : bool
rect Rect /// The Rect true rect. ///
guiRect bool /// Determines if the rect is on GUI coordinate ///
리턴 bool

OnDrawGizmos() 공개 메소드

public OnDrawGizmos ( ) : void
리턴 void

OnEnable() 공개 메소드

public OnEnable ( ) : void
리턴 void

OnGUI() 공개 메소드

public OnGUI ( ) : void
리턴 void

RemoveReservedArea() 공개 정적인 메소드

Removes a reserved area.
public static RemoveReservedArea ( Rect rec ) : void
rec Rect /// Rec. ///
리턴 void

RemoveReservedGuiArea() 공개 정적인 메소드

public static RemoveReservedGuiArea ( Rect rec ) : void
rec Rect
리턴 void

ResetTouch() 공개 정적인 메소드

Resets a specific touch.
public static ResetTouch ( int fingerIndex ) : void
fingerIndex int /// Finger index. ///
리턴 void

ResetTouches() 공개 메소드

public ResetTouches ( ) : void
리턴 void

SetCamera() 공개 정적인 메소드

Sets the camera uses by EasyTouch to linePick for auto-selection.
public static SetCamera ( Camera cam, bool guiCam = false ) : void
cam Camera /// The camera ///
guiCam bool
리턴 void

SetEnable2FingersGesture() 공개 정적인 메소드

Enables or disables the recognize of 2 fingers gesture.
public static SetEnable2FingersGesture ( bool enable ) : void
enable bool /// true = enabled
/// false = disabled ///
리턴 void

SetEnableAutoSelect() 공개 정적인 메소드

Enables or disables auto select.
public static SetEnableAutoSelect ( bool enable ) : void
enable bool /// true = enabled /// false = disables ///
리턴 void

SetEnablePinch() 공개 정적인 메소드

Enables or disables the recognize of pinch gesture
public static SetEnablePinch ( bool enable ) : void
enable bool /// true = enabled /// false = disables ///
리턴 void

SetEnableTwist() 공개 정적인 메소드

Enables or disables the recognize of twist gesture
public static SetEnableTwist ( bool enable ) : void
enable bool /// true = enabled
/// false = disabled ///
리턴 void

SetEnabled() 공개 정적인 메소드

Enables or disables Easy Touch.
public static SetEnabled ( bool enable ) : void
enable bool /// true = enable
/// false = disable ///
리턴 void

SetIsReservedArea() 공개 정적인 메소드

Sets if Reserved Area is enable or disable
public static SetIsReservedArea ( bool enable ) : void
enable bool /// Enable. ///
리턴 void

SetMinPinchLength() 공개 정적인 메소드

Sets the minimum length of the pinch.
public static SetMinPinchLength ( float length ) : void
length float /// Float. ///
리턴 void

SetMinTwistAngle() 공개 정적인 메소드

Sets the minimum twist angle.
public static SetMinTwistAngle ( float angle ) : void
angle float /// Float ///
리턴 void

SetOtherReceiverObject() 공개 정적인 메소드

Sets the other receiver for EasyTouch event.
public static SetOtherReceiverObject ( GameObject receiver ) : void
receiver GameObject /// GameObject. ///
리턴 void

SetPickableLayer() 공개 정적인 메소드

Sets the pickable layer.
public static SetPickableLayer ( LayerMask mask ) : void
mask LayerMask /// Mask. ///
리턴 void

SetStationnaryTolerance() 공개 정적인 메소드

Sets the stationnary tolerance.
public static SetStationnaryTolerance ( float tolerance ) : void
tolerance float /// float Tolerance. ///
리턴 void

SetSwipeTolerance() 공개 정적인 메소드

Sets the swipe tolerance.
public static SetSwipeTolerance ( float tolerance ) : void
tolerance float /// Float ///
리턴 void

SetlongTapTime() 공개 정적인 메소드

Set the long tap time in second
public static SetlongTapTime ( float time ) : void
time float /// Float ///
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

Update() 공개 메소드

public Update ( ) : void
리턴 void

UpdateTouches() 공개 메소드

public UpdateTouches ( bool realTouch, int touchCount ) : void
realTouch bool
touchCount int
리턴 void

프로퍼티 상세

StationnaryTolerance 공개적으로 프로퍼티

public float StationnaryTolerance
리턴 float

autoSelect 공개적으로 프로퍼티

public bool autoSelect
리턴 bool

enable 공개적으로 프로퍼티

public bool enable
리턴 bool

enable2FingersGesture 공개적으로 프로퍼티

public bool enable2FingersGesture
리턴 bool

enablePinch 공개적으로 프로퍼티

public bool enablePinch
리턴 bool

enableRemote 공개적으로 프로퍼티

public bool enableRemote
리턴 bool

enableReservedArea 공개적으로 프로퍼티

public bool enableReservedArea
리턴 bool

enableTwist 공개적으로 프로퍼티

public bool enableTwist
리턴 bool

enabledNGuiMode 공개적으로 프로퍼티

public bool enabledNGuiMode
리턴 bool

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

public static EasyTouch, instance
리턴 EasyTouch,

isExtension 공개적으로 프로퍼티

public bool isExtension
리턴 bool

longTapTime 공개적으로 프로퍼티

public float longTapTime
리턴 float

minPinchLength 공개적으로 프로퍼티

public float minPinchLength
리턴 float

minTwistAngle 공개적으로 프로퍼티

public float minTwistAngle
리턴 float

nGUICameras 공개적으로 프로퍼티

public List nGUICameras
리턴 List

nGUILayers 공개적으로 프로퍼티

public LayerMask nGUILayers
리턴 LayerMask

pickableLayers 공개적으로 프로퍼티

public LayerMask pickableLayers
리턴 LayerMask

receiverObject 공개적으로 프로퍼티

public GameObject receiverObject
리턴 GameObject

reservedAreas 공개적으로 프로퍼티

public List reservedAreas
리턴 List

reservedGuiAreas 공개적으로 프로퍼티

public List reservedGuiAreas
리턴 List

reservedVirtualAreas 공개적으로 프로퍼티

public List reservedVirtualAreas
리턴 List

secondFingerTexture 공개적으로 프로퍼티

public Texture secondFingerTexture
리턴 Texture

showGeneral 공개적으로 프로퍼티

public bool showGeneral
리턴 bool

showGesture 공개적으로 프로퍼티

public bool showGesture
리턴 bool

showSecondFinger 공개적으로 프로퍼티

public bool showSecondFinger
리턴 bool

showSelect 공개적으로 프로퍼티

public bool showSelect
리턴 bool

showTwoFinger 공개적으로 프로퍼티

public bool showTwoFinger
리턴 bool

swipeKey 공개적으로 프로퍼티

public KeyCode, swipeKey
리턴 KeyCode,

swipeTolerance 공개적으로 프로퍼티

public float swipeTolerance
리턴 float

touchCameras 공개적으로 프로퍼티

public List touchCameras
리턴 List

twistKey 공개적으로 프로퍼티

public KeyCode, twistKey
리턴 KeyCode,

useBroadcastMessage 공개적으로 프로퍼티

public bool useBroadcastMessage
리턴 bool