static CrossPlatformInputManager()
 {
     s_TouchInput = new MobileInput();
     s_HardwareInput = new StandaloneInput();
     #if MOBILE_INPUT
     activeInput = s_TouchInput;
     #else
     activeInput = s_HardwareInput;
     #endif
 }
        static CrossPlatformInputManager()
        {
            s_TouchInput    = new MobileInput();
            s_HardwareInput = new StandaloneInput();
#if MOBILE_INPUT
            activeInput = s_TouchInput;
#else
            activeInput = s_HardwareInput;
#endif
        }
        public static void SwitchActiveInputMethod(ActiveInputMethod activeInputMethod)
        {
            switch (activeInputMethod)
            {
            case ActiveInputMethod.Hardware:
                activeInput = s_HardwareInput;
                break;

            case ActiveInputMethod.Touch:
                activeInput = s_TouchInput;
                break;
            }
        }
        public static void SwitchActiveInputMethod(ActiveInputMethod activeInputMethod)
        {
            switch (activeInputMethod)
            {
                case ActiveInputMethod.Hardware:
                    activeInput = s_HardwareInput;
                    break;

                case ActiveInputMethod.Touch:
                    activeInput = s_TouchInput;
                    break;
            }
        }
Esempio n. 5
0
 /// <summary>
 /// 登记按钮
 /// </summary>
 public void Register()
 {
     VirtualInput.RegisterButton(this);
 }
Esempio n. 6
0
 /// <summary>
 /// 登记摇杆
 /// </summary>
 public void Register()
 {
     VirtualInput.RegisterAxis(this);
 }