コード例 #1
0
 void Update()
 {
     if (CustomInput.UsingPad != usingPad)
     {
         usingPad = CustomInput.UsingPad;
         if (usingPad)
         {
             if (!(type == ActionType.Screech || type == ActionType.Reload))
             {
                 SetImage(1);                            // General parts of a controller
             }
             else if (CustomInput.GamePadType(0) == CustomInput.ControlType.Xbox)
             {
                 SetImage(1);                            // Xbox buttons
             }
             else if (CustomInput.GamePadType(0) == CustomInput.ControlType.PS3 ||
                      CustomInput.GamePadType(0) == CustomInput.ControlType.PS4)
             {
                 SetImage(2);                            // PS buttons
             }
         }
         else
         {
             SetImage(0);                                // Keyboard and Mouse
         }
     }
 }