예제 #1
0
        /// <summary>
        /// 获取到UI操作对象
        /// </summary>
        /// <param name="handIndex"></param>
        /// <param name="platform"></param>
        /// <returns></returns>
        public static UIOperate GetUIOperate(int handIndex, OperatePlatform platform)
        {
            MOperate operate = GetOperateHand(handIndex, platform);

            if (operate == null)
            {
                return(null);
            }

            return(operate.UIOperate);
        }
예제 #2
0
        /// <summary>
        /// 添加手势端
        /// </summary>
        /// <param name="inputHand"></param>
        /// <param name="func"></param>
        public static MOperate AddOperateHand(MInputHand inputHand, IHandController handController, Func <bool> func = null)
        {
            MOperate operate = GetOperateHand(inputHand.HandIndex, inputHand.Platform);

            if (operate != null)
            {
                operate.RayExternaLimit = func;
                return(operate);
            }

            operate = new MOperate(inputHand, func, handController);

            Operates.Add(new OperateKey(inputHand.HandIndex, inputHand.Platform), operate);

            return(operate);
        }