Beispiel #1
0
        private bool IsMenuAxis(int actionId, int axisIndex)
        {
            if (Object.op_Equality((Object)this.rewiredStandaloneInputModule, (Object)null))
            {
                return(false);
            }
            IList <Player> allPlayers = ReInput.get_players().get_AllPlayers();
            int            count1     = ((ICollection <Player>)allPlayers).Count;

            for (int index1 = 0; index1 < count1; ++index1)
            {
                IList <JoystickMap> maps = (IList <JoystickMap>)((Player.ControllerHelper.MapHelper)((Player.ControllerHelper)allPlayers[index1].controllers).maps).GetMaps <JoystickMap>((int)((Controller)this.joystick).id);
                if (maps != null)
                {
                    int count2 = ((ICollection <JoystickMap>)maps).Count;
                    for (int index2 = 0; index2 < count2; ++index2)
                    {
                        IList <ActionElementMap> axisMaps = ((ControllerMapWithAxes)maps[index2]).get_AxisMaps();
                        if (axisMaps != null)
                        {
                            int count3 = ((ICollection <ActionElementMap>)axisMaps).Count;
                            for (int index3 = 0; index3 < count3; ++index3)
                            {
                                ActionElementMap actionElementMap = axisMaps[index3];
                                if (actionElementMap.get_actionId() == actionId && actionElementMap.get_elementIndex() == axisIndex)
                                {
                                    return(true);
                                }
                            }
                        }
                    }
                }
            }
            return(false);
        }
Beispiel #2
0
 public InputSetting(ActionElementMap _actionElementMap)
 {
     this.categoryId          = _actionElementMap.get_controllerMap().get_categoryId();
     this.layoutId            = _actionElementMap.get_controllerMap().get_layoutId();
     this.controllerType      = _actionElementMap.get_controllerMap().get_controllerType();
     this.elementType         = _actionElementMap.get_elementType();
     this.elementIdentifierId = _actionElementMap.get_elementIdentifierId();
     this.axisRange           = _actionElementMap.get_axisRange();
     this.keyboardKey         = _actionElementMap.get_keyCode();
     this.modifierKeyFlags    = _actionElementMap.get_modifierKeyFlags();
     this.actionId            = _actionElementMap.get_actionId();
     this.axisContribution    = _actionElementMap.get_axisContribution();
     this.invert       = _actionElementMap.get_invert();
     this.elementMapId = _actionElementMap.get_id();
 }