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; } }
/// <summary> /// 登记按钮 /// </summary> public void Register() { VirtualInput.RegisterButton(this); }
/// <summary> /// 登记摇杆 /// </summary> public void Register() { VirtualInput.RegisterAxis(this); }