From 9db54e8ca9cc859e5c60fa7c0bdd66d9f7ddff73 Mon Sep 17 00:00:00 2001 From: omid3098 Date: Mon, 24 Jul 2017 01:28:54 +0430 Subject: [PATCH] Set mobile touch count in terminal inspector --- .../Sample/Scene/SampleScene.unity | Bin 31076 -> 31700 bytes Assets/OpenTerminal/Scripts/Terminal.cs | 2 ++ .../Scripts/TerminalInputHandler.cs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Assets/OpenTerminal/Sample/Scene/SampleScene.unity b/Assets/OpenTerminal/Sample/Scene/SampleScene.unity index b0faf9e3bea42859dc8b52dcea5e70435788d4d9..7124979bf421b41b65aaa61674d747af92d75915 100644 GIT binary patch delta 1640 zcmZ9MdraF^6vxjkWut{5(6X?!AY>A%bI`}u0+R^>?g46bospT!inJ@EtVC8F=^rq4 zvKg1rT*l@e1`@M%Qw-ZLBy+kb{v$r(M&zGG=Oft+%KT&Qk7_2F-&<}e_9iFi+|Rl9 zd(S<;$IZXkOpFx~?H(Ws&k#{A;t_bVnk|lUOS#!+yI@$WEp55-VeOAqwx=&1s`xj$ z>Fn zo}NzS%e-Z2Ia{kQpa1m0!}BK&8|R1bYVYwI`8T-5q)XR8vyR_!>6BY5{i^&`C$3L7 z?|98@Yn;2q^THo&os3NG zIWRo*I5cZiL>cg6h|c{WI;S*k&QSMlVYnG=9a3xK3(!AO(I}RA!Nv8;Q+T)J6)8L{ zxjBWuCAoNrVkGnPj47A)Ho-KOh%_E;oDu$K`#=mgt((}Y!;~(9< z9c~TZ-tJ)M_~G^qRW9&!*yXqF_(2d&p$pyc%V6!Vmz4=ti4Q#lFS_QHY@9Q%u4Xe( z1G+5U_+2tH2ssnx;yXWX?-3zg0y_#X6yBB0$)ANnKMr~nRQzpD%FMWASzxCm`vok5 z`3l%+$@cM4D9kP=+7BwUzw(@^hof#33_C%Tp`GX*IBCRT{Hjy3%j5UWM` zy>LSHBgy)C1PU1_^#xEJY+Pn`f+bXW_`Q8d(KWC`@IqlovYq@_pKjwdT&w|94;z-5 zf*h>EJRf#UvT-mc<||>xC8J!$x~qXHulRk8srdDdO+0I_j@x$6Gd17uFH@YI(;8md TyM_C&>SCR&ba%XKlR1SQ38%E~@ex?(nMvx$;cE(vG(!GuVA zlq@Q`fGK8a4_R4}L4lP~kYS`<>GC0nD6r_l`k(bgU!s@&Iq&(MKj%H?dEX6uQC@#i zCNbvDWz6Sdj78wS6p_uhCR=TVwyr4_{j`ZG<*~~1k?-Au4{pu5p?_#Y{ehY>9T{;g zV9bAtM=VI>2lWGrR(L}z)w*YZ*J09#kKz65@Eo_(Rk9(GZePX0XVslxcR=p!E&IhelK0kK+Yz<8j2t?jryy~T8?wVIOi))sL*sG_5HbM$iu4aCkGk}Y4v?Ykn z*f>>8u&7e7ke@_FVrh(9;ung9se2Sd%CN~i*zV}d_NhE0c~3g{Mbl*NvP~7AP5)~k zEb%`RrUl-8J<&5yeb=(+$G+vY?LBmI`!S9dkuI9(G@YE-zErDmoAjvuoUPyNlwzg7BY6KDRQpLn(8Ns_PhY<8FPh|HN{eRhl@;_SxI=##~XD?I*h z4*mJIs^PDJG8)gI;@3>c!k_C?{&hT&!FD3jQKI8Dh4Yj%{Bq%ADo@*NOsPdXGbnvy&B} zcVy)f7`ewncO^4p$Q1@WV8Mg(2nM41c zO_*fId9~YEWx)8IaL}=Kta$4scQ2R^k-DChEEOx&AgA|pPO?6*waAT7r(`B9L-W(q zdF8PR1Xd5W7m@lkN@l`>@P!ABO@E9$&SRYM7$y2!ML`E;r4+l{kw-(#lJy$I22Z*o zT8i=&Ma^~IOn%j?tTQ#D0$2iR|R;3OL diff --git a/Assets/OpenTerminal/Scripts/Terminal.cs b/Assets/OpenTerminal/Scripts/Terminal.cs index 8df78cc..d1b8a47 100644 --- a/Assets/OpenTerminal/Scripts/Terminal.cs +++ b/Assets/OpenTerminal/Scripts/Terminal.cs @@ -19,11 +19,13 @@ public class Terminal : MonoBehaviour private TerminalInputHandler inputHandler; private TerminalGUI terminalGui; public TouchScreenKeyboard touchScreenKeyboard; + public int mobileTouchCount = 4; void Awake() { instance = this; if (config == null) config = Resources.Load("Config/ZSH"); + if (mobileTouchCount <= 0) mobileTouchCount = 4; autoCompIndex = 0; autoCompList = new List(); terminalMethods = new TerminalMethods(); diff --git a/Assets/OpenTerminal/Scripts/TerminalInputHandler.cs b/Assets/OpenTerminal/Scripts/TerminalInputHandler.cs index 3571d37..b9ea397 100644 --- a/Assets/OpenTerminal/Scripts/TerminalInputHandler.cs +++ b/Assets/OpenTerminal/Scripts/TerminalInputHandler.cs @@ -64,7 +64,7 @@ private bool MobileInput() terminal.touchScreenKeyboard = null; } } - if (Input.touchCount == 4) + if (Input.touchCount == terminal.mobileTouchCount) { ellapsedTime += Time.deltaTime; }