/// <summary> /// 注册虚拟轴 /// </summary> /// <param name="axis">虚拟轴</param> public void RegisterVirtualAxis(VirtualAxisBase axis) { if (axis == null) { Log.Error("Can no register null axis."); return; } CrossPlatformInputManager.RegisterVirtualAxis(axis); }
/// <summary> /// 注册虚拟按钮 /// </summary> /// <param name="button">虚拟按钮</param> public void UnRegisterVirtualAxis(VirtualAxisBase virtualAxis) { if (virtualAxis == null) { Log.Error("virtualAxis is null."); return; } if (string.IsNullOrEmpty(virtualAxis.Name)) { Log.Error("name is invlid."); return; } CrossPlatformInputManager.UnRegisterVirtualAxis(virtualAxis.Name); }