This commit is contained in:
2024-10-16 00:03:41 +08:00
commit 897058435c
5033 changed files with 1009728 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8636b46a30994e6418c03f066dd398eb
folderAsset: yes
timeCreated: 1454534249
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e942dffb140fa5c41bdea0387f2b1611
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a68960aaa0f5dca449809cb0b1b27c11
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 9cb9b4964fc653b4280fd1964220fe98
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,58 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MultiLayerTouch : MonoBehaviour {
public Text label;
public Text label2;
void OnEnable(){
EasyTouch.On_TouchDown += On_TouchDown;
EasyTouch.On_TouchUp += On_TouchUp;
}
void OnDestroy(){
EasyTouch.On_TouchDown -= On_TouchDown;
EasyTouch.On_TouchUp -= On_TouchUp;
}
void On_TouchDown (Gesture gesture)
{
if (gesture.pickedObject!=null){
if (!EasyTouch.GetAutoUpdatePickedObject()){
label.text = "Picked object from event : " + gesture.pickedObject.name + " : " + gesture.position;
}
else{
label.text = "Picked object from event : " + gesture.pickedObject.name + " : " + gesture.position;
}
}
else{
if (!EasyTouch.GetAutoUpdatePickedObject()){
label.text = "Picked object from event : none";
}
else{
label.text = "Picked object from event : none";
}
}
label2.text = "";
if (!EasyTouch.GetAutoUpdatePickedObject()){
GameObject tmp = gesture.GetCurrentPickedObject();
if (tmp != null){
label2.text = "Picked object from GetCurrentPickedObject : " + tmp.name ;
}
else{
label2.text = "Picked object from GetCurrentPickedObject : none";
}
}
}
void On_TouchUp (Gesture gesture)
{
label.text="";
label2.text="";
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e216320e99cdf2a46b09dfd99909dd12
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,58 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MultiLayerUI : MonoBehaviour {
public void SetAutoSelect(bool value){
EasyTouch.SetEnableAutoSelect( value );
}
public void SetAutoUpdate( bool value){
EasyTouch.SetAutoUpdatePickedObject( value);
}
public void Layer1( bool value){
LayerMask mask = EasyTouch.Get3DPickableLayer();
if (value)
mask = mask | (1<<8);
else{
mask = ~mask;
mask = ~(mask | (1<<8));
}
EasyTouch.Set3DPickableLayer( mask);
}
public void Layer2( bool value){
LayerMask mask = EasyTouch.Get3DPickableLayer();
if (value)
mask = mask | (1<<9);
else{
mask = ~mask;
mask = ~(mask | (1<<9));
}
EasyTouch.Set3DPickableLayer( mask);
}
public void Layer3( bool value){
LayerMask mask = EasyTouch.Get3DPickableLayer();
if (value)
mask = mask | (1<<10);
else{
mask = ~mask;
mask = ~(mask | (1<<10));
}
EasyTouch.Set3DPickableLayer( mask);
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 6f90638b553ac94438157f6b4c58cbad
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 84a338d71379a134f9db0c3cac9ea126
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 578fdf5bb9585174b9b0a88a41758e52
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MultiCameraTouch : MonoBehaviour {
public Text label;
void OnEnable(){
EasyTouch.On_TouchDown += On_TouchDown;
EasyTouch.On_TouchUp += On_TouchUp;
}
void OnDestroy(){
EasyTouch.On_TouchDown -= On_TouchDown;
EasyTouch.On_TouchUp -= On_TouchUp;
}
void On_TouchDown (Gesture gesture)
{
if (gesture.pickedObject != null){
label.text = "You touch : " + gesture.pickedObject.name + " on camera : " + gesture.pickedCamera.name;
}
}
void On_TouchUp (Gesture gesture)
{
label.text = "";
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4632564b2dbf5804a9d37598f0b5b601
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MultiCameraUI : MonoBehaviour {
public Camera cam2;
public Camera cam3;
public void AddCamera2(bool value){
AddCamera( cam2,value);
}
public void AddCamera3(bool value){
AddCamera( cam3,value);
}
public void AddCamera(Camera cam,bool value){
if (value){
EasyTouch.AddCamera( cam,false);
}
else{
EasyTouch.RemoveCamera( cam);
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e50b1bdf57f5ec14abc2c012c9b3b572
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c2c62ee1634f7de4490a71af5e85b7e5
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 5ac22eac33e47d5449d5b86b4d91c34f
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: cc4e6501cec44964ea149ac7656bcf9b
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class CubeSelect : MonoBehaviour {
private GameObject cube;
void OnEnable(){
EasyTouch.On_SimpleTap += On_SimpleTap;
}
void OnDestroy(){
EasyTouch.On_SimpleTap -= On_SimpleTap;
}
void Start(){
cube= null;
}
void On_SimpleTap (Gesture gesture){
if (gesture.pickedObject !=null && gesture.pickedObject.name=="Cube"){
ResteColor();
cube = gesture.pickedObject;
cube.GetComponent<Renderer>().material.color = Color.red;
}
}
void ResteColor(){
if (cube!=null){
cube.GetComponent<Renderer>().material.color = new Color(60f/255f,143f/255f,201f/255f);
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 68d853e7dd8695b4a8079972e40963e6
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,43 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class RTSCamera : MonoBehaviour {
private Vector3 delta;
void OnEnable(){
EasyTouch.On_Swipe += On_Swipe;
EasyTouch.On_Drag += On_Drag;
EasyTouch.On_Twist += On_Twist;
EasyTouch.On_Pinch += On_Pinch;
}
void On_Twist (Gesture gesture){
transform.Rotate( Vector3.up * gesture.twistAngle);
}
void OnDestroy(){
EasyTouch.On_Swipe -= On_Swipe;
EasyTouch.On_Drag -= On_Drag;
EasyTouch.On_Twist -= On_Twist;
}
void On_Drag (Gesture gesture){
On_Swipe( gesture);
}
void On_Swipe (Gesture gesture){
transform.Translate( Vector3.left * gesture.deltaPosition.x / Screen.width);
transform.Translate( Vector3.back * gesture.deltaPosition.y / Screen.height);
}
void On_Pinch (Gesture gesture){
Camera.main.fieldOfView += gesture.deltaPinch * Time.deltaTime;
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 4ada74f31ee49e34681124dbda740a5c
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 1cf9c78521d12f14d8690a557c4c1103
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 95511c078470de147aa305315a4be8ee
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,8 @@
using UnityEngine;
using System.Collections;
public class Ball : MonoBehaviour {
// Update is called once per frame
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0ab70292744e9c9448bf89c713e8d90a
timeCreated: 1456741077
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 200
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,82 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class BallRunPlayer : MonoBehaviour {
public Transform ballModel;
private bool start =false;
private Vector3 moveDirection;
private CharacterController characterController;
private Vector3 startPosition;
private bool isJump = false;
void OnEnable(){
EasyTouch.On_SwipeEnd += On_SwipeEnd;
}
void OnDestroy(){
EasyTouch.On_SwipeEnd -= On_SwipeEnd;
}
void Start(){
characterController = GetComponent<CharacterController>();
startPosition = transform.position;
}
void Update () {
if (start){
moveDirection = transform.TransformDirection(Vector3.forward)* 10f * Time.deltaTime;
moveDirection.y -= 9.81f * Time.deltaTime;
if (isJump){
moveDirection.y = 8f;
isJump = false;
}
characterController.Move( moveDirection);
ballModel.Rotate( Vector3.right * 400 * Time.deltaTime);
}
if (transform.position.y<0.5){
start=false;
transform.position = startPosition;
}
}
void OnCollision(){
Debug.Log("ok");
}
void On_SwipeEnd (Gesture gesture){
if (start){
switch (gesture.swipe){
case EasyTouch.SwipeDirection.DownLeft:
case EasyTouch.SwipeDirection.UpLeft:
case EasyTouch.SwipeDirection.Left:
transform.Rotate(Vector3.up * -90);
break;
case EasyTouch.SwipeDirection.DownRight:
case EasyTouch.SwipeDirection.UpRight:
case EasyTouch.SwipeDirection.Right:
transform.Rotate(Vector3.up * 90);
break;
case EasyTouch.SwipeDirection.Up:
if (characterController.isGrounded){
isJump = true;
}
break;
}
}
}
public void StartGame(){
start = true;
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f2c2690da05f1ee41b37fea93ee7fd77
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,31 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class ThirdPersonCamera : MonoBehaviour
{
public float distanceAway; // distance from the back of the craft
public float distanceUp; // distance above the craft
public float smooth; // how smooth the camera movement is
private GameObject hovercraft; // to store the hovercraft
private Vector3 targetPosition; // the position the camera is trying to be in
Transform follow;
void Start(){
follow = GameObject.FindWithTag ("Player").transform;
}
void LateUpdate ()
{
// setting the target position to be the correct offset from the hovercraft
targetPosition = follow.position + Vector3.up * distanceUp - follow.forward * distanceAway;
// making a smooth transition between it's current position and the position it wants to be in
transform.position = Vector3.Lerp(transform.position, targetPosition, Time.deltaTime * smooth);
// make sure the camera is looking the right way!
transform.LookAt(follow);
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: d84d76fc294bc384d9ea022f75bf9fe1
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class LoadExamples : MonoBehaviour {
public void LoadExample(string level){
SceneManager.LoadScene(level);
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: db7f11d9ad8a0764a9b3dbe2f43daa93
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 53f576f5d104c124c9fdd963147758e2
folderAsset: yes
timeCreated: 1435661089
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 88d29e16d9dfe2e4e9e7d668948f9c78
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,77 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class FingerTouch : MonoBehaviour {
private TextMesh textMesh;
public Vector3 deltaPosition = Vector2.zero;
public int fingerId=-1;
void OnEnable(){
EasyTouch.On_TouchStart += On_TouchStart;
EasyTouch.On_TouchUp += On_TouchUp;
EasyTouch.On_Swipe += On_Swipe;
EasyTouch.On_Drag += On_Drag;
EasyTouch.On_DoubleTap += On_DoubleTap;
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
}
void OnDestroy(){
EasyTouch.On_TouchStart -= On_TouchStart;
EasyTouch.On_TouchUp -= On_TouchUp;
EasyTouch.On_Swipe -= On_Swipe;
EasyTouch.On_Drag -= On_Drag;
EasyTouch.On_DoubleTap -= On_DoubleTap;
}
void On_Drag (Gesture gesture)
{
if ( gesture.pickedObject.transform.IsChildOf(gameObject.transform) && fingerId == gesture.fingerIndex){
Vector3 position = gesture.GetTouchToWorldPoint(gesture.pickedObject.transform.position);
transform.position = position - deltaPosition;
}
}
void On_Swipe (Gesture gesture)
{
if (fingerId == gesture.fingerIndex){
Vector3 position = gesture.GetTouchToWorldPoint(transform.position);
transform.position = position - deltaPosition;
}
}
void On_TouchStart (Gesture gesture)
{
if (gesture.pickedObject!=null && gesture.pickedObject.transform.IsChildOf(gameObject.transform)){
fingerId = gesture.fingerIndex;
textMesh.text = fingerId.ToString();
Vector3 position = gesture.GetTouchToWorldPoint(gesture.pickedObject.transform.position);
deltaPosition = position - transform.position;
}
}
void On_TouchUp (Gesture gesture)
{
if (gesture.fingerIndex == fingerId){
fingerId = -1;
textMesh.text="";
}
}
public void InitTouch(int ind){
fingerId = ind;
textMesh.text = fingerId.ToString();
}
void On_DoubleTap (Gesture gesture)
{
if (gesture.pickedObject!=null && gesture.pickedObject.transform.IsChildOf(gameObject.transform)){
DestroyImmediate( transform.gameObject );
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7c81a78944a453f46829a14c2789f59e
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,26 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class MutliFingersScreenTouch : MonoBehaviour {
public GameObject touchGameObject;
void OnEnable(){
EasyTouch.On_TouchStart += On_TouchStart;
}
void OnDestroy(){
EasyTouch.On_TouchStart -= On_TouchStart;
}
void On_TouchStart (Gesture gesture)
{
if (gesture.pickedObject == null){
Vector3 position = gesture.GetTouchToWorldPoint(5);
(Instantiate( touchGameObject,position, Quaternion.identity) as GameObject).GetComponent<FingerTouch>().InitTouch( gesture.fingerIndex);
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 917423f633dae9f46afdbd2a301af9d4
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,413 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &162504
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 462504}
- component: {fileID: 21262510}
- component: {fileID: 5862510}
m_Layer: 0
m_Name: TouchSprtie
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &462504
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162504}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 462506}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &21262510
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162504}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 65998af61294ec74a8629a4fe17ef652, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!58 &5862510
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162504}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
serializedVersion: 2
m_Radius: 0.64
--- !u!1 &162506
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 462506}
- component: {fileID: 11462510}
m_Layer: 0
m_Name: Touch
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &462506
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162506}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -13.03, y: 5.77, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 462508}
- {fileID: 462504}
- {fileID: 462510}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &11462510
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162506}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7c81a78944a453f46829a14c2789f59e, type: 3}
m_Name:
m_EditorClassIdentifier:
deltaPosition: {x: 0, y: 0, z: 0}
fingerId: -1
--- !u!1 &162508
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 462508}
- component: {fileID: 9662510}
m_Layer: 0
m_Name: Trail
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &462508
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162508}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 462506}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!96 &9662510
TrailRenderer:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162508}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: d6863324f3084eb4386e890cacfee5c3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Time: 0.6
m_PreviewTimeScale: 1
m_Parameters:
serializedVersion: 3
widthMultiplier: 1
widthCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0.5
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
colorGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 1, g: 1, b: 1, a: 1}
key3: {r: 1, g: 1, b: 1, a: 1}
key4: {r: 1, g: 1, b: 1, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 16384
ctime2: 32768
ctime3: 49151
ctime4: 65535
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 16384
atime2: 32768
atime3: 49151
atime4: 65535
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 5
m_NumAlphaKeys: 5
numCornerVertices: 0
numCapVertices: 0
alignment: 0
textureMode: 0
textureScale: {x: 1, y: 1}
shadowBias: 0
generateLightingData: 0
m_MinVertexDistance: 0.1
m_MaskInteraction: 0
m_Autodestruct: 0
m_Emitting: 1
m_ApplyActiveColorSpace: 0
--- !u!1 &162510
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 462510}
- component: {fileID: 2362510}
- component: {fileID: 10262510}
m_Layer: 0
m_Name: FingerID
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &462510
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162510}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.34, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 462506}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &2362510
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162510}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!102 &10262510
TextMesh:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 162510}
m_Text:
m_OffsetZ: 0
m_CharacterSize: 0.23
m_LineSpacing: 1
m_Anchor: 4
m_Alignment: 1
m_TabSize: 4
m_FontSize: 36
m_FontStyle: 1
m_RichText: 0
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_Color:
serializedVersion: 2
rgba: 4294967295

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: edd6bb59932bfeb48964819704114a96
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: a17adf9d350388a41817b5ebfc091867
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ce0088f9159699a45a227c42db16dc6c
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: af4d646a671787a4e8db9e671d2287fa
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class DoubleTapMe : MonoBehaviour {
// Subscribe to events
void OnEnable(){
EasyTouch.On_DoubleTap += On_DoubleTap;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_DoubleTap -= On_DoubleTap;
}
// Double tap
private void On_DoubleTap( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7d557199f581b794bbfd7a9d35a3f973
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,85 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class DragMe : MonoBehaviour {
private TextMesh textMesh;
private Color startColor;
private Vector3 deltaPosition;
private int fingerIndex;
// Subscribe to events
void OnEnable(){
EasyTouch.On_Drag += On_Drag;
EasyTouch.On_DragStart += On_DragStart;
EasyTouch.On_DragEnd += On_DragEnd;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_Drag -= On_Drag;
EasyTouch.On_DragStart -= On_DragStart;
EasyTouch.On_DragEnd -= On_DragEnd;
}
void Start(){
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
startColor = gameObject.GetComponent<Renderer>().material.color;
}
// At the drag beginning
void On_DragStart( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
fingerIndex = gesture.fingerIndex;
RandomColor();
// the world coordinate from touch
Vector3 position = gesture.GetTouchToWorldPoint(gesture.pickedObject.transform.position);
deltaPosition = position - transform.position;
}
}
// During the drag
void On_Drag(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject && fingerIndex == gesture.fingerIndex){
// the world coordinate from touch
Vector3 position = gesture.GetTouchToWorldPoint(gesture.pickedObject.transform.position);
transform.position = position - deltaPosition;
// Get the drag angle
float angle = gesture.GetSwipeOrDragAngle();
textMesh.text = angle.ToString("f2") + " / " + gesture.swipe.ToString();
}
}
// At the drag end
void On_DragEnd(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
gameObject.GetComponent<Renderer>().material.color = startColor;
textMesh.text="Drag me";
}
}
private void RandomColor(){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: c0374fa01d32d07449d95d045798efd4
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class LongTapMe : MonoBehaviour {
private TextMesh textMesh;
private Color startColor;
// Subscribe to events
void OnEnable(){
EasyTouch.On_LongTapStart += On_LongTapStart;
EasyTouch.On_LongTap += On_LongTap;
EasyTouch.On_LongTapEnd += On_LongTapEnd;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_LongTapStart -= On_LongTapStart;
EasyTouch.On_LongTap -= On_LongTap;
EasyTouch.On_LongTapEnd -= On_LongTapEnd;
}
void Start(){
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
startColor = gameObject.GetComponent<Renderer>().material.color;
}
// At the long tap beginning
private void On_LongTapStart( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject==gameObject){
RandomColor();
}
}
// During the long tap
private void On_LongTap( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject==gameObject){
textMesh.text = gesture.actionTime.ToString("f2");
}
}
// At the long tap end
private void On_LongTapEnd( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject==gameObject){
gameObject.GetComponent<Renderer>().material.color = startColor;
textMesh.text="Long tap me";
}
}
private void RandomColor(){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: e42eb6686b4c49a4b813dd56294fffba
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,56 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class Swipe : MonoBehaviour {
public GameObject trail;
public Text swipeText;
// Subscribe to events
void OnEnable(){
EasyTouch.On_SwipeStart += On_SwipeStart;
EasyTouch.On_Swipe += On_Swipe;
EasyTouch.On_SwipeEnd += On_SwipeEnd;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_SwipeStart -= On_SwipeStart;
EasyTouch.On_Swipe -= On_Swipe;
EasyTouch.On_SwipeEnd -= On_SwipeEnd;
}
// At the swipe beginning
private void On_SwipeStart( Gesture gesture){
swipeText.text = "You start a swipe";
}
// During the swipe
private void On_Swipe(Gesture gesture){
// the world coordinate from touch for z=5
Vector3 position = gesture.GetTouchToWorldPoint(5);
trail.transform.position = position;
}
// At the swipe end
private void On_SwipeEnd(Gesture gesture){
// Get the swipe angle
float angles = gesture.GetSwipeOrDragAngle();
swipeText.text = "Last swipe : " + gesture.swipe.ToString() + " / vector : " + gesture.swipeVector.normalized + " / angle : " + angles.ToString("f2");
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ec1dbe3df0ef246469010be22ddf3652
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,33 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TapMe : MonoBehaviour {
// Subscribe to events
void OnEnable(){
EasyTouch.On_SimpleTap += On_SimpleTap;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_SimpleTap -= On_SimpleTap;
}
// Simple tap
private void On_SimpleTap( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 0a5d800b35e8f5945878e883b3d2a525
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,67 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TouchMe : MonoBehaviour {
private TextMesh textMesh;
private Color startColor;
// Subscribe to events
void OnEnable(){
EasyTouch.On_TouchStart += On_TouchStart;
EasyTouch.On_TouchDown += On_TouchDown;
EasyTouch.On_TouchUp += On_TouchUp;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_TouchStart -= On_TouchStart;
EasyTouch.On_TouchDown -= On_TouchDown;
EasyTouch.On_TouchUp -= On_TouchUp;
}
void Start () {
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
startColor = gameObject.GetComponent<Renderer>().material.color;
}
// At the touch beginning
private void On_TouchStart(Gesture gesture){
if (gesture.pickedObject == gameObject){
RandomColor();
}
}
// During the touch is down
private void On_TouchDown(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
textMesh.text = "Down since :" + gesture.actionTime.ToString("f2");
}
}
// At the touch end
private void On_TouchUp(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
gameObject.GetComponent<Renderer>().material.color = startColor;
textMesh.text ="Touch me";
}
}
private void RandomColor(){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 91705704ea736ef41a8cb3a6c149cc38
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6b566d4b95ab5884e9aed875f4f519df
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: d82248ce6f3cbd34680b70fe59a53523
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,91 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class PinchMe : MonoBehaviour {
private TextMesh textMesh;
// Subscribe to events
void OnEnable(){
EasyTouch.On_TouchStart2Fingers += On_TouchStart2Fingers;
EasyTouch.On_PinchIn += On_PinchIn;
EasyTouch.On_PinchOut += On_PinchOut;
EasyTouch.On_PinchEnd += On_PinchEnd;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
// Unsubscribe to events
void UnsubscribeEvent(){
EasyTouch.On_TouchStart2Fingers -= On_TouchStart2Fingers;
EasyTouch.On_PinchIn -= On_PinchIn;
EasyTouch.On_PinchOut -= On_PinchOut;
EasyTouch.On_PinchEnd -= On_PinchEnd;
}
void Start(){
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
}
// At the 2 fingers touch beginning
private void On_TouchStart2Fingers( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject ){
// disable twist gesture recognize for a real pinch end
EasyTouch.SetEnableTwist( false);
EasyTouch.SetEnablePinch( true);
}
}
// At the pinch in
private void On_PinchIn(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
float zoom = Time.deltaTime * gesture.deltaPinch;
Vector3 scale = transform.localScale ;
transform.localScale = new Vector3( scale.x - zoom, scale.y -zoom, scale.z-zoom);
textMesh.text = "Delta pinch : " + gesture.deltaPinch.ToString();
}
}
// At the pinch out
private void On_PinchOut(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
float zoom = Time.deltaTime * gesture.deltaPinch;
Vector3 scale = transform.localScale ;
transform.localScale = new Vector3( scale.x + zoom, scale.y +zoom,scale.z+zoom);
textMesh.text = "Delta pinch : " + gesture.deltaPinch.ToString();
}
}
// At the pinch end
private void On_PinchEnd(Gesture gesture){
if (gesture.pickedObject == gameObject){
transform.localScale =new Vector3(2.5f,2.5f,2.5f);
EasyTouch.SetEnableTwist( true);
textMesh.text="Pinch me";
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 9e0c0637362429045b51848c8ecde3e8
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,18 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TooglePickMethodUI : MonoBehaviour {
public void SetPickMethod2Finger(bool value){
if (value)
EasyTouch.SetTwoFingerPickMethod( EasyTouch.TwoFingerPickMethod.Finger);
}
public void SetPickMethod2Averager(bool value){
if (value)
EasyTouch.SetTwoFingerPickMethod( EasyTouch.TwoFingerPickMethod.Average);
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7f681517e2331d74f8b93a0f2f648948
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,77 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TwistMe : MonoBehaviour {
private TextMesh textMesh;
// Subscribe to events
void OnEnable(){
EasyTouch.On_TouchStart2Fingers += On_TouchStart2Fingers;
EasyTouch.On_Twist += On_Twist;
EasyTouch.On_TwistEnd += On_TwistEnd;
EasyTouch.On_Cancel2Fingers += On_Cancel2Fingers;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_TouchStart2Fingers -= On_TouchStart2Fingers;
EasyTouch.On_Twist -= On_Twist;
EasyTouch.On_TwistEnd -= On_TwistEnd;
EasyTouch.On_Cancel2Fingers -= On_Cancel2Fingers;
}
void Start(){
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
}
void On_TouchStart2Fingers(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject ){
// disable twist gesture recognize for a real pinch end
EasyTouch.SetEnableTwist( true);
EasyTouch.SetEnablePinch( false);
}
}
// during the txist
void On_Twist( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
transform.Rotate( new Vector3(0,0,gesture.twistAngle));
textMesh.text = "Delta angle : " + gesture.twistAngle.ToString();
}
}
// at the twist end
void On_TwistEnd( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
EasyTouch.SetEnablePinch( true);
transform.rotation = Quaternion.identity;
textMesh.text ="Twist me";
}
}
// If the two finger gesture is finished
void On_Cancel2Fingers(Gesture gesture){
EasyTouch.SetEnablePinch( true);
transform.rotation = Quaternion.identity;
textMesh.text ="Twist me";
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: dfc81fbca6ade17489686010b0aa93b2
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,32 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TwoDoubleTapMe : MonoBehaviour {
// Subscribe to events
void OnEnable(){
EasyTouch.On_DoubleTap2Fingers += On_DoubleTap2Fingers;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_DoubleTap2Fingers -= On_DoubleTap2Fingers;
}
// Double Tap
void On_DoubleTap2Fingers( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: fffad73ea4da41a4aa105bd2a8c5d90f
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,92 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TwoDragMe : MonoBehaviour {
private TextMesh textMesh;
private Vector3 deltaPosition;
private Color startColor;
// Subscribe to events
void OnEnable(){
EasyTouch.On_DragStart2Fingers += On_DragStart2Fingers;
EasyTouch.On_Drag2Fingers += On_Drag2Fingers;
EasyTouch.On_DragEnd2Fingers += On_DragEnd2Fingers;
EasyTouch.On_Cancel2Fingers += On_Cancel2Fingers;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_DragStart2Fingers -= On_DragStart2Fingers;
EasyTouch.On_Drag2Fingers -= On_Drag2Fingers;
EasyTouch.On_DragEnd2Fingers -= On_DragEnd2Fingers;
EasyTouch.On_Cancel2Fingers -= On_Cancel2Fingers;
}
void Start(){
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
startColor = gameObject.GetComponent<Renderer>().material.color;
}
// At the drag beginning
void On_DragStart2Fingers(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
RandomColor();
// the world coordinate from touch
Vector3 position = gesture.GetTouchToWorldPoint(gesture.pickedObject.transform.position);
deltaPosition = position - transform.position;
}
}
// During the drag
void On_Drag2Fingers(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
// the world coordinate from touch
Vector3 position = gesture.GetTouchToWorldPoint(gesture.pickedObject.transform.position);
transform.position = position - deltaPosition;
// Get the drag angle
float angle = gesture.GetSwipeOrDragAngle();
textMesh.text = angle.ToString("f2") + " / " + gesture.swipe.ToString();
}
}
// At the drag end
void On_DragEnd2Fingers(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
gameObject.GetComponent<Renderer>().material.color = startColor;
textMesh.text="Drag me";
}
}
// If the two finger gesture is finished
void On_Cancel2Fingers(Gesture gesture){
On_DragEnd2Fingers( gesture);
}
void RandomColor(){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 85f24bf25a126d046a7f0f659fab80d8
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TwoLongTapMe : MonoBehaviour {
private TextMesh textMesh;
private Color startColor;
// Subscribe to events
void OnEnable(){
EasyTouch.On_LongTapStart2Fingers += On_LongTapStart2Fingers;
EasyTouch.On_LongTap2Fingers += On_LongTap2Fingers;
EasyTouch.On_LongTapEnd2Fingers += On_LongTapEnd2Fingers;
EasyTouch.On_Cancel2Fingers += On_Cancel2Fingers;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_LongTapStart2Fingers -= On_LongTapStart2Fingers;
EasyTouch.On_LongTap2Fingers -= On_LongTap2Fingers;
EasyTouch.On_LongTapEnd2Fingers -= On_LongTapEnd2Fingers;
EasyTouch.On_Cancel2Fingers -= On_Cancel2Fingers;
}
void Start(){
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
startColor = gameObject.GetComponent<Renderer>().material.color;
}
// At the long tap beginning
void On_LongTapStart2Fingers( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
RandomColor();
}
}
// During the long tap
void On_LongTap2Fingers( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
textMesh.text = gesture.actionTime.ToString("f2");
}
}
// At the long tap end
void On_LongTapEnd2Fingers( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
gameObject.GetComponent<Renderer>().material.color = startColor;
textMesh.text="Long tap me";
}
}
// If the two finger gesture is finished
void On_Cancel2Fingers(Gesture gesture){
On_LongTapEnd2Fingers( gesture);
}
void RandomColor(){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 7a3b433d016ead3409fcbcd22bc9d730
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,57 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TwoSwipe : MonoBehaviour {
public GameObject trail;
public Text swipeData;
// Subscribe to events
void OnEnable(){
EasyTouch.On_SwipeStart2Fingers += On_SwipeStart2Fingers;
EasyTouch.On_Swipe2Fingers += On_Swipe2Fingers;
EasyTouch.On_SwipeEnd2Fingers += On_SwipeEnd2Fingers;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_SwipeStart2Fingers -= On_SwipeStart2Fingers;
EasyTouch.On_Swipe2Fingers -= On_Swipe2Fingers;
EasyTouch.On_SwipeEnd2Fingers -= On_SwipeEnd2Fingers;
}
// At the swipe beginning
private void On_SwipeStart2Fingers( Gesture gesture){
swipeData.text = "You start a swipe";
}
// During the swipe
private void On_Swipe2Fingers(Gesture gesture){
// the world coordinate from touch for z=5
Vector3 position = gesture.GetTouchToWorldPoint(5);
trail.transform.position = position;
}
// At the swipe end
private void On_SwipeEnd2Fingers(Gesture gesture){
// Get the swipe angle
float angles = gesture.GetSwipeOrDragAngle();
swipeData.text = "Last swipe : " + gesture.swipe.ToString() + " / vector : " + gesture.swipeVector.normalized + " / angle : " + angles.ToString("f2");
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: f134654b31a6bd64abbfe8a3bd3dfbd2
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,36 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TwoTapMe : MonoBehaviour {
// Subscribe to events
void OnEnable(){
EasyTouch.On_SimpleTap2Fingers += On_SimpleTap2Fingers;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_SimpleTap2Fingers -= On_SimpleTap2Fingers;
}
// Simple 2 fingers tap
void On_SimpleTap2Fingers( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
RandomColor();
}
}
void RandomColor(){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 051cd1f9ca5241146b22abaf55148bab
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,71 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class TwoTouchMe : MonoBehaviour {
private TextMesh textMesh;
private Color startColor;
// Subscribe to events
void OnEnable(){
EasyTouch.On_TouchStart2Fingers += On_TouchStart2Fingers;
EasyTouch.On_TouchDown2Fingers += On_TouchDown2Fingers;
EasyTouch.On_TouchUp2Fingers += On_TouchUp2Fingers;
EasyTouch.On_Cancel2Fingers += On_Cancel2Fingers;
}
void OnDisable(){
UnsubscribeEvent();
}
void OnDestroy(){
UnsubscribeEvent();
}
void UnsubscribeEvent(){
EasyTouch.On_TouchStart2Fingers -= On_TouchStart2Fingers;
EasyTouch.On_TouchDown2Fingers -= On_TouchDown2Fingers;
EasyTouch.On_TouchUp2Fingers -= On_TouchUp2Fingers;
EasyTouch.On_Cancel2Fingers -= On_Cancel2Fingers;
}
void Start(){
textMesh =(TextMesh) GetComponentInChildren<TextMesh>();
startColor = gameObject.GetComponent<Renderer>().material.color;
}
void On_TouchStart2Fingers( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
RandomColor();
}
}
void On_TouchDown2Fingers(Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
textMesh.text = "Down since :" + gesture.actionTime.ToString("f2");
}
}
void On_TouchUp2Fingers( Gesture gesture){
// Verification that the action on the object
if (gesture.pickedObject == gameObject){
gameObject.GetComponent<Renderer>().material.color = startColor;
textMesh.text ="Touch me";
}
}
void On_Cancel2Fingers( Gesture gesture){
On_TouchUp2Fingers( gesture);
}
void RandomColor(){
gameObject.GetComponent<Renderer>().material.color = new Color( Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f), Random.Range(0.0f,1.0f));
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 18f5c6c178d81794aac2b4aaed8e2443
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 973c73f34132a1a4bbad8414c56117de
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a7a268f9e2e00894e8c7181fe0a3b9e7
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: c8d1bdec0a5c94e46b668642301b5f37
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,41 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class ETWindow : MonoBehaviour {
private bool drag = false;
void OnEnable(){
EasyTouch.On_TouchDown += On_TouchDown;
EasyTouch.On_TouchStart += On_TouchStart;
}
void OnDestroy(){
EasyTouch.On_TouchDown -= On_TouchDown;
EasyTouch.On_TouchStart -= On_TouchStart;
}
void On_TouchStart (Gesture gesture){
drag = false;
if (gesture.isOverGui){
if (gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)){
transform.SetAsLastSibling();
drag = true;
}
}
}
void On_TouchDown (Gesture gesture){
if (gesture.isOverGui){
if ((gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)) && drag){
transform.position += (Vector3)gesture.deltaPosition;
}
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 6ccfc5726b9e77a4bbd70ca5cf41667f
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,55 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class GlobalEasyTouchEvent : MonoBehaviour {
public Text statText;
void OnEnable(){
EasyTouch.On_TouchDown += On_TouchDown;
EasyTouch.On_TouchUp += On_TouchUp;
EasyTouch.On_OverUIElement += On_OverUIElement;
EasyTouch.On_UIElementTouchUp += On_UIElementTouchUp;
}
void OnDestroy(){
EasyTouch.On_TouchDown -= On_TouchDown;
EasyTouch.On_TouchUp -= On_TouchUp;
EasyTouch.On_OverUIElement -= On_OverUIElement;
EasyTouch.On_UIElementTouchUp -= On_UIElementTouchUp;
}
void On_TouchDown (Gesture gesture){
Debug.Log("ok");
statText.transform.SetAsFirstSibling();
if (gesture.pickedUIElement!=null){
statText.text = "You touch UI Element : " + gesture.pickedUIElement.name + " (from gesture event)";
}
if (!gesture.isOverGui && gesture.pickedObject==null ){
statText.text = "You touch an empty area";
}
if (gesture.pickedObject!= null && !gesture.isOverGui){
statText.text = "You touch a 3D Object";
}
}
void On_OverUIElement (Gesture gesture){
statText.text = "You touch UI Element : " + gesture.pickedUIElement.name + " (from On_OverUIElement event)";
}
void On_UIElementTouchUp (Gesture gesture){
statText.text = "";
}
void On_TouchUp (Gesture gesture){
statText.text = "";
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: efba75273de65054e88ef18fe36e7861
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,10 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class UICompatibility : MonoBehaviour {
public void SetCompatibility(bool value){
EasyTouch.SetUICompatibily( value);
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: a39275133a80ef847b811dc44498e522
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,14 @@
using UnityEngine;
using UnityEngine.EventSystems;
using HedgehogTeam.EasyTouch;
public class UIWindow : MonoBehaviour, IDragHandler, IPointerDownHandler{
public void OnDrag (PointerEventData eventData){
transform.position += (Vector3)eventData.delta;
}
public void OnPointerDown (PointerEventData eventData){
transform.SetAsLastSibling();
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 507335065ad687d409f652b32157a533
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: dcb94fbcb0ca858409cbe374e2151fd0
folderAsset: yes
timeCreated: 1435661090
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
fileFormatVersion: 2
guid: 2b637e0281534ee42801e601e811e9ea
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,88 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class UIDrag : MonoBehaviour {
private int fingerId = -1;
private bool drag = true;
void OnEnable(){
EasyTouch.On_TouchDown += On_TouchDown;
EasyTouch.On_TouchStart += On_TouchStart;
EasyTouch.On_TouchUp += On_TouchUp;
EasyTouch.On_TouchStart2Fingers += On_TouchStart2Fingers;
EasyTouch.On_TouchDown2Fingers += On_TouchDown2Fingers;
EasyTouch.On_TouchUp2Fingers += On_TouchUp2Fingers;
}
void OnDestroy(){
EasyTouch.On_TouchDown -= On_TouchDown;
EasyTouch.On_TouchStart -= On_TouchStart;
EasyTouch.On_TouchUp -= On_TouchUp;
EasyTouch.On_TouchStart2Fingers -= On_TouchStart2Fingers;
EasyTouch.On_TouchDown2Fingers -= On_TouchDown2Fingers;
EasyTouch.On_TouchUp2Fingers -= On_TouchUp2Fingers;
}
void On_TouchStart (Gesture gesture){
if (gesture.isOverGui && drag){
if ((gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)) && fingerId==-1){
fingerId = gesture.fingerIndex;
transform.SetAsLastSibling();
}
}
}
void On_TouchDown (Gesture gesture){
if (fingerId == gesture.fingerIndex && drag){
if (gesture.isOverGui ){
if ((gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)) ){
transform.position += (Vector3)gesture.deltaPosition;
}
}
}
}
void On_TouchUp (Gesture gesture){
if (fingerId == gesture.fingerIndex){
fingerId = -1;
}
}
void On_TouchStart2Fingers (Gesture gesture)
{
if (gesture.isOverGui && drag){
if ((gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)) && fingerId==-1){
transform.SetAsLastSibling();
}
}
}
void On_TouchDown2Fingers (Gesture gesture)
{
if (gesture.isOverGui){
if (gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)){
if ((gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)) ){
transform.position += (Vector3)gesture.deltaPosition;
}
drag = false;
}
}
}
void On_TouchUp2Fingers (Gesture gesture)
{
if (gesture.isOverGui){
if (gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)){
drag = true;
}
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 8c17e2f5c251e2945b2ee5c0d8a7bcd6
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,26 @@
using UnityEngine;
using System.Collections;
using HedgehogTeam.EasyTouch;
public class UIPinch : MonoBehaviour {
public void OnEnable(){
EasyTouch.On_Pinch += On_Pinch;
}
public void OnDestroy(){
EasyTouch.On_Pinch -= On_Pinch;
}
void On_Pinch (Gesture gesture){
if (gesture.isOverGui){
if (gesture.pickedUIElement == gameObject || gesture.pickedUIElement.transform.IsChildOf( transform)){
transform.localScale = new Vector3(transform.localScale.x + gesture.deltaPinch * Time.deltaTime, transform.localScale.y+gesture.deltaPinch * Time.deltaTime, transform.localScale.z );
}
}
}
}

View File

@@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: ac23532f5f5ff844aa05600846e0083f
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More