From b0b5a015e29dbf57ea28835eba92c7e0a81fcef6 Mon Sep 17 00:00:00 2001 From: Cristian Ponce Date: Tue, 17 Oct 2017 21:34:39 -0700 Subject: [PATCH 1/2] Analog Recognizer * Customizable analog touch gestures * Updated DemoOne Scene --- .../Recognizers/TKAnalogRecognizer.cs | 188 ++++++++++++++++++ .../Recognizers/TKAnalogRecognizer.cs.meta | 12 ++ Assets/TouchKitDemos/DemoOne/DemoOne.cs | 61 +++++- ProjectSettings/ProjectVersion.txt | 2 +- TouchKit.Editor.csproj | 134 +++++++++++++ TouchKit.csproj | 108 ++++++++++ 6 files changed, 503 insertions(+), 2 deletions(-) create mode 100644 Assets/TouchKit/Recognizers/TKAnalogRecognizer.cs create mode 100644 Assets/TouchKit/Recognizers/TKAnalogRecognizer.cs.meta create mode 100644 TouchKit.Editor.csproj create mode 100644 TouchKit.csproj diff --git a/Assets/TouchKit/Recognizers/TKAnalogRecognizer.cs b/Assets/TouchKit/Recognizers/TKAnalogRecognizer.cs new file mode 100644 index 0000000..12c1713 --- /dev/null +++ b/Assets/TouchKit/Recognizers/TKAnalogRecognizer.cs @@ -0,0 +1,188 @@ +using UnityEngine; +using System; +using System.Collections.Generic; + + +/// +/// TouchKit Analog Recognizer to allow for an invisible analog which is +/// usually best when working with mobile devices to avoid having a cluncky UI +/// in the way of what's important to the player +/// +public class TKAnalogRecognizer : TKAbstractGestureRecognizer +{ + public event Action gestureRecognizedEvent; + public event Action gestureCompleteEvent; + + public AnimationCurve inputCurve = AnimationCurve.Linear(0.0f, 0.0f, 1.0f, 1.0f); + public Vector2 value; + public Vector2 touchPadCenter; + + /// + /// How far out to extend from the center of the rect or the initial tap position + /// + public float touchPadRadius = 50f; + + /// + /// If false, the center of the analog will be wherever the initial touch is inside the rect + /// + public bool useRectOrigin = false; + + /// + /// if false, the radius will determine how far out from the center to go to get to 1 or -1 + /// + public bool useRectSize = false; + + /// + /// only necessary if there is a rect in the same space waiting for a tap gesture + /// + public bool ignoreInitialTouch = false; + + + /// + /// the constructor ensures we have a frame to work with for this recognizer + /// by default: use initial tap as analog center and default radius + /// + public TKAnalogRecognizer(TKRect frame) + { + this.boundaryFrame = frame; + this.ignoreInitialTouch = false; + this.useRectOrigin = false; + this.useRectSize = false; + } + + /// + /// ignoring the initial touch is only necessary if there is a rect in the same space waiting for a tap gesture + /// + public TKAnalogRecognizer(TKRect frame, bool ignoreInitialTouch) + { + this.boundaryFrame = frame; + this.ignoreInitialTouch = ignoreInitialTouch; + this.useRectOrigin = false; + this.useRectSize = false; + } + + /// + /// change radius size + /// + public TKAnalogRecognizer(TKRect frame, float radius) + { + this.boundaryFrame = frame; + this.touchPadRadius = radius; + this.ignoreInitialTouch = false; + this.useRectOrigin = false; + this.useRectSize = false; + } + + /// + /// set the analog radius and use the rect's origin as the center point + /// + public TKAnalogRecognizer(TKRect frame, float radius, bool useRectOrigin) + { + this.boundaryFrame = frame; + this.touchPadRadius = radius; + this.useRectOrigin = useRectOrigin; + this.ignoreInitialTouch = false; + this.useRectSize = false; + } + + /// + /// use rect origin as center point and rect size to determine analog position + /// + public TKAnalogRecognizer(TKRect frame, bool useRectOrigin, bool useRectSize) + { + this.boundaryFrame = frame; + this.useRectOrigin = useRectOrigin; + this.useRectSize = useRectSize; + this.ignoreInitialTouch = false; + } + + internal override bool touchesBegan(List touches) + { + if (state == TKGestureRecognizerState.Possible) + { + for (var i = 0; i < touches.Count; i++) + { + // only add touches in the Began phase + if (touches[i].phase == TouchPhase.Began) + _trackingTouches.Add(touches[i]); + } + + if (_trackingTouches.Count > 0) + { + state = TKGestureRecognizerState.Began; + + // call through to touchesMoved so we set the value and set the state to RecognizedAndStillRecognizing which triggers the recognized event + touchesMoved(touches, ignoreInitialTouch); + } + } + return false; + } + + internal override void touchesMoved(List touches) + { + + if (state == TKGestureRecognizerState.RecognizedAndStillRecognizing || state == TKGestureRecognizerState.Began) + { + var currentLocation = touchLocation(); + value = currentLocation - (useRectOrigin ? boundaryFrame.Value.center : touchPadCenter); + + // normalize from 0 - 1 and clamp + value.x = Mathf.Clamp(value.x / (useRectSize ? (boundaryFrame.Value.width * 0.5f) : touchPadRadius), -1f, 1f); + value.y = Mathf.Clamp(value.y / (useRectSize ? (boundaryFrame.Value.height * 0.5f) : touchPadRadius), -1f, 1f); + + // apply our inputCurve + value.x = inputCurve.Evaluate(Mathf.Abs(value.x)) * Mathf.Sign(value.x); + value.y = inputCurve.Evaluate(Mathf.Abs(value.y)) * Mathf.Sign(value.y); + + state = TKGestureRecognizerState.RecognizedAndStillRecognizing; + } + } + + /// + /// If also has a tap recognizer we want to ignore the first touch as to not be confused in using the analog + /// + internal void touchesMoved(List touches, bool ignoreInitialTouch) + { + if (state == TKGestureRecognizerState.Began && ignoreInitialTouch) + { + //cashe starting touch position and ignore initial touch in case it's a tap + touchPadCenter = startTouchLocation(); + } + else + { + // call through to touchesMoved so we set the value and set the state to RecognizedAndStillRecognizing which triggers the recognized event + touchesMoved(touches); + } + } + + internal override void touchesEnded(List touches) + { + // remove any completed touches + for (var i = 0; i < touches.Count; i++) + { + if (touches[i].phase == TouchPhase.Ended) + _trackingTouches.Remove(touches[i]); + } + + // if we had previously been recognizing fire our complete event + if (state == TKGestureRecognizerState.RecognizedAndStillRecognizing) + { + if (gestureCompleteEvent != null) + gestureCompleteEvent(this); + } + + value = Vector2.zero; + state = TKGestureRecognizerState.FailedOrEnded; + } + + internal override void fireRecognizedEvent() + { + if (gestureRecognizedEvent != null) + gestureRecognizedEvent(this); + } + + public override string ToString() + { + return string.Format("[{0}] state: {1}, value: {2}", this.GetType(), state, value); + } +} \ No newline at end of file diff --git a/Assets/TouchKit/Recognizers/TKAnalogRecognizer.cs.meta b/Assets/TouchKit/Recognizers/TKAnalogRecognizer.cs.meta new file mode 100644 index 0000000..97e1d0a --- /dev/null +++ b/Assets/TouchKit/Recognizers/TKAnalogRecognizer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1ac90f2d4c248874b8a3b8f1c559bbe6 +timeCreated: 1508296272 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/TouchKitDemos/DemoOne/DemoOne.cs b/Assets/TouchKitDemos/DemoOne/DemoOne.cs index 3352311..26b97a4 100644 --- a/Assets/TouchKitDemos/DemoOne/DemoOne.cs +++ b/Assets/TouchKitDemos/DemoOne/DemoOne.cs @@ -95,8 +95,67 @@ void OnGUI() TouchKit.addGestureRecognizer( recognizer ); } + if(GUILayout.Button("Add Analog Recognizer")) + { + var recognizer = new TKAnalogRecognizer(new TKRect(0f, 0f, 125f, 125f)); + recognizer.inputCurve = touchPadInputCurve; - if( GUILayout.Button( "Add Horizontal Swipe Recognizer" ) ) + //change the default analog radius + recognizer.touchPadRadius = 100f; + + recognizer.gestureRecognizedEvent += (r) => + { + Debug.Log("analog recognizer fired: " + r); + }; + + // continuous gestures have a complete event so that we know when they are done recognizing + recognizer.gestureCompleteEvent += r => + { + Debug.Log("analog gesture complete"); + }; + + TouchKit.addGestureRecognizer(recognizer); + } + + if (GUILayout.Button("Add Analog and Tap Recognizer")) + { + var analog = new TKAnalogRecognizer(new TKRect(0f, 0f, 125f, 125f), true); + analog.inputCurve = touchPadInputCurve; + + //change the default analog radius + analog.touchPadRadius = 100f; + + analog.gestureRecognizedEvent += (r) => + { + Debug.Log("analog recognizer fired: " + r); + }; + + // continuous gestures have a complete event so that we know when they are done recognizing + analog.gestureCompleteEvent += r => + { + Debug.Log("analog gesture complete"); + }; + + TouchKit.addGestureRecognizer(analog); + + var tap = new TKTapRecognizer(); + + // setting the rect to the same as the analog + tap.boundaryFrame = new TKRect(0, 0, 125f, 125f); + + // we can also set the number of touches required for the gesture + if (Application.platform == RuntimePlatform.IPhonePlayer) + tap.numberOfTouchesRequired = 2; + + tap.gestureRecognizedEvent += (r) => + { + Debug.Log("tap recognizer fired: " + r); + }; + TouchKit.addGestureRecognizer(tap); + } + + + if ( GUILayout.Button( "Add Horizontal Swipe Recognizer" ) ) { var recognizer = new TKSwipeRecognizer(); recognizer.gestureRecognizedEvent += ( r ) => diff --git a/ProjectSettings/ProjectVersion.txt b/ProjectSettings/ProjectVersion.txt index 66e05aa..a211ccd 100644 --- a/ProjectSettings/ProjectVersion.txt +++ b/ProjectSettings/ProjectVersion.txt @@ -1 +1 @@ -m_EditorVersion: 5.5.0f3 +m_EditorVersion: 2017.1.1f1 diff --git a/TouchKit.Editor.csproj b/TouchKit.Editor.csproj new file mode 100644 index 0000000..25dddd5 --- /dev/null +++ b/TouchKit.Editor.csproj @@ -0,0 +1,134 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {B4CEDA6E-BEC6-C801-6FA8-0BB4D8845564} + Library + Assembly-CSharp-Editor + 512 + {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + .NETFramework + v3.5 + Unity Full v3.5 + + Editor:5 + StandaloneWindows64:19 + 2017.1.1f1 + + 4 + + + pdbonly + false + Temp\UnityVS_bin\Debug\ + Temp\UnityVS_obj\Debug\ + prompt + 4 + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_1;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + pdbonly + false + Temp\UnityVS_bin\Release\ + Temp\UnityVS_obj\Release\ + prompt + 4 + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_1;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + + + + + + + + + + Library\UnityAssemblies\UnityEditor.dll + + + Library\UnityAssemblies\UnityEngine.dll + + + Library\UnityAssemblies\UnityEditor.Advertisements.dll + + + Library\UnityAssemblies\UnityEngine.UI.dll + + + Library\UnityAssemblies\UnityEditor.UI.dll + + + Library\UnityAssemblies\UnityEngine.Networking.dll + + + Library\UnityAssemblies\UnityEditor.Networking.dll + + + Library\UnityAssemblies\UnityEditor.TestRunner.dll + + + Library\UnityAssemblies\UnityEngine.TestRunner.dll + + + Library\UnityAssemblies\nunit.framework.dll + + + Library\UnityAssemblies\UnityEngine.Timeline.dll + + + Library\UnityAssemblies\UnityEditor.Timeline.dll + + + Library\UnityAssemblies\UnityEditor.TreeEditor.dll + + + Library\UnityAssemblies\UnityEngine.Analytics.dll + + + Library\UnityAssemblies\UnityEditor.Analytics.dll + + + Library\UnityAssemblies\UnityEditor.HoloLens.dll + + + Library\UnityAssemblies\UnityEngine.HoloLens.dll + + + Library\UnityAssemblies\UnityEditor.Purchasing.dll + + + Library\UnityAssemblies\UnityEditor.VR.dll + + + Library\UnityAssemblies\UnityEditor.Graphs.dll + + + Library\UnityAssemblies\UnityEditor.Android.Extensions.dll + + + Library\UnityAssemblies\UnityEditor.WindowsStandalone.Extensions.dll + + + Library\UnityAssemblies\SyntaxTree.VisualStudio.Unity.Bridge.dll + + + + + {1C942FA4-2EDF-3A32-0F1E-9B8C31E89A38} + TouchKit + + + + + + + + + diff --git a/TouchKit.csproj b/TouchKit.csproj new file mode 100644 index 0000000..643fe42 --- /dev/null +++ b/TouchKit.csproj @@ -0,0 +1,108 @@ + + + + Debug + AnyCPU + 10.0.20506 + 2.0 + {1C942FA4-2EDF-3A32-0F1E-9B8C31E89A38} + Library + Assembly-CSharp + 512 + {E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + .NETFramework + v3.5 + Unity Subset v3.5 + + Game:1 + StandaloneWindows64:19 + 2017.1.1f1 + + 4 + + + pdbonly + false + Temp\UnityVS_bin\Debug\ + Temp\UnityVS_obj\Debug\ + prompt + 4 + DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_1;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + pdbonly + false + Temp\UnityVS_bin\Release\ + Temp\UnityVS_obj\Release\ + prompt + 4 + TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_1_1;UNITY_2017_1;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_RUNTIME_NAVMESH_BUILDING;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU + true + + + + + + + + + + + + Library\UnityAssemblies\UnityEditor.dll + + + Library\UnityAssemblies\UnityEngine.dll + + + Library\UnityAssemblies\UnityEngine.UI.dll + + + Library\UnityAssemblies\UnityEngine.Networking.dll + + + Library\UnityAssemblies\UnityEngine.TestRunner.dll + + + Library\UnityAssemblies\nunit.framework.dll + + + Library\UnityAssemblies\UnityEngine.Timeline.dll + + + Library\UnityAssemblies\UnityEngine.Analytics.dll + + + Library\UnityAssemblies\UnityEngine.HoloLens.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 373241f1b9a6875feb13af73d5490367e410d773 Mon Sep 17 00:00:00 2001 From: Cristian Ponce Date: Tue, 17 Oct 2017 21:43:47 -0700 Subject: [PATCH 2/2] Updated README * Added Analog Recognizer description --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index daa013b..1ec8e57 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ TouchKit comes with a few built in recognizers to get you started and to serve a * **Button Recognizer**: generic button recognizer designed to work with any 2D sprite system at all * **Pan Recognizer**: detects a pan gesture (one or more fingers down and moving around the screen) * **TouchPad Recognizer**: detects and tracks a touch in an area and maps the location from -1 to 1 on the x and y axis based on the touches distance from the center of the area +* **Analog Recognizer**: detects and tracks a touch in an area and maps the location from -1 to 1 on the x and y axis based on the analog's radius and distance from the initial tap position * **Swipe Recognizer**: detects swipes in the four cardinal directions * **Pinch Recognizer**: detects pinches and reports back the delta scale * **Rotation Recognizer**: detects two finger rotation and reports back the delta rotation