コード例 #1
0
 // Token: 0x06000255 RID: 597 RVA: 0x00037D08 File Offset: 0x00035F08
 public virtual ActionElementMap GetActionElementMapToUse(Controller controller, string theAction, bool positiveAxis)
 {
     if (!RuntimeServices.EqualityOperator(controller, null))
     {
         ControllerMap      map = this.player.controllers.maps.GetMap(controller.type, controller.id, "Default", "Default");
         ActionElementMap[] elementMapsWithAction = map.GetElementMapsWithAction(theAction);
         int i = 0;
         ActionElementMap[] array = elementMapsWithAction;
         int length = array.Length;
         while (i < length)
         {
             if (array[i].axisContribution == ((!positiveAxis) ? Pole.Negative : Pole.Positive))
             {
                 return(array[i]);
             }
             i++;
         }
         map = this.player.controllers.maps.GetMap(controller.type, controller.id, "Motorcycle", "Default");
         if (!RuntimeServices.EqualityOperator(map, null))
         {
             elementMapsWithAction = map.GetElementMapsWithAction(theAction);
             int j = 0;
             ActionElementMap[] array2 = elementMapsWithAction;
             int length2 = array2.Length;
             while (j < length2)
             {
                 if (array2[j].axisContribution == ((!positiveAxis) ? Pole.Negative : Pole.Positive))
                 {
                     return(array2[j]);
                 }
                 j++;
             }
         }
         map = this.player.controllers.maps.GetMap(controller.type, controller.id, "UI Nav", "Default");
         if (!RuntimeServices.EqualityOperator(map, null))
         {
             elementMapsWithAction = map.GetElementMapsWithAction(theAction);
             int k = 0;
             ActionElementMap[] array3 = elementMapsWithAction;
             int length3 = array3.Length;
             while (k < length3)
             {
                 if (array3[k].axisContribution == ((!positiveAxis) ? Pole.Negative : Pole.Positive))
                 {
                     return(array3[k]);
                 }
                 k++;
             }
         }
     }
     return(null);
 }