示例#1
0
                public void Classify()
                {
                    var classifier = new SmartPhoneTouchClassifier();

                    if (touchMode == SmartPhoneTouchMode.None)
                    {
                        var result = classifier.Classify(screenPositions, deltaTime, isEnd, hitObjects);
                        if (result.inedex != -1)
                        {
                            this.touchMode  = result.touchMode;
                            this.reciever   = hitObjects[result.inedex];
                            this.isStartNow = true;
                        }
                    }
                }
 private bool checkState(SmartPhoneTouchReciever reciever, SmartPhoneTouchMode mode)
 {
     if (mode == SmartPhoneTouchMode.Tap)
     {
         return(reciever.checkTap);
     }
     if (mode == SmartPhoneTouchMode.Flick)
     {
         return(reciever.checkFlick);
     }
     if (mode == SmartPhoneTouchMode.LongTouch)
     {
         return(reciever.checkLongTouch);
     }
     return(false);
 }
 private bool IsFront(SmartPhoneTouchReciever target, SmartPhoneTouchReciever opponent)
 {
     return(target.gameObject.transform.position.z < opponent.gameObject.transform.position.z);
 }