Example #1
0
        public List <Touchable> GetTouchable(TouchableType touchableType)
        {
            List <Touchable> tList = new List <Touchable>();

            foreach (Touchable t in Touchables)
            {
                if (t.touchableType == touchableType)
                {
                    tList.Add(t);
                }
            }

            return(tList);
        }
        Touchable GetFirstTouch(TouchDetector targetTouchDetector, TouchableType touchableType)
        {
            if (targetTouchDetector == null)
            {
                return(null);
            }

            if (targetTouchDetector.TouchablesDictionary.ContainsKey(touchableType))
            {
                if (targetTouchDetector.TouchablesDictionary[touchableType].Count > 0)
                {
                    foreach (Touchable touchable in targetTouchDetector.TouchablesDictionary[TouchableType.CHARACTER])
                    {
                        return(touchable);
                    }
                }
            }

            return(null);
        }