コード例 #1
0
 public void Start() 

 {
     if (EasyModeButtonController.IsButtonPressed() && ShowKeysButtonController.IsButtonPressed())
     {
         for (int i = 0; i < actionKeys.Length; i++)
         {
             if (Input.IsActionJustPressed(actionKeys[i]))
             {
                 playList = PlayListController.GetPlayListNumber(soundsName[i]);
                 ChangePressedTextureButtonImage(soundsName[i]);
                 grandPianoSounds[i].Play();
             }
             if (!Input.IsActionPressed(actionKeys[i]))
             {
                 ChangeTextureButtonImage(soundsName[i]);
             }
         }
     }
     else
     {
         for (int i = 0; i < grandPianoSounds.Length; i++)
         {
             if (Input.IsActionJustPressed(actionKeys[i]) && !Input.IsActionJustPressed("Shift+" + actionKeys[i]))
             {
                 playList = PlayListController.GetPlayListNumber(soundsName[i]);
                 ChangePressedTextureButtonImage(soundsName[i]);
                 grandPianoSounds[i].Play();
             }
             if (!Input.IsActionPressed(actionKeys[i]))
             {
                 ChangeTextureButtonImage(soundsName[i]);
             }
         }
     } 

 }