コード例 #1
0
 void pressedBlueCenterRelease()
 {
     if (!(moduleSolved))
     {
         Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonRelease, transform);
         Vector3 pos = buttonMesh[6].transform.localPosition;
         pos.y = 0.0169f;
         buttonMesh[6].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
         if (flag)
         {
             flag = false;
             coloredHexabuttons.StartCoroutine(movements(blueRotations));
         }
         else
         {
             flag = true;
             hexButtons[0].transform.localPosition = new Vector3(-0.025f, 0.0169f, 0.034f);
             hexButtons[1].transform.localPosition = new Vector3(0.025f, 0.0169f, 0.034f);
             hexButtons[2].transform.localPosition = new Vector3(-0.05f, 0.0169f, -0.008f);
             hexButtons[3].transform.localPosition = new Vector3(0.05f, 0.0169f, -0.008f);
             hexButtons[4].transform.localPosition = new Vector3(-0.025f, 0.0169f, -0.05f);
             hexButtons[5].transform.localPosition = new Vector3(0.025f, 0.0169f, -0.05f);
             foreach (int i in buttonIndex)
             {
                 buttonText[i].color      = Color.white;
                 buttonText[i].text       = blueButtonText[i] + "";
                 hexButtons[i].OnInteract = null;
                 ledMesh[i].material      = ledColors[0];
             }
             numButtonPresses = 0;
             coloredHexabuttons.setOrder("0123456");
         }
     }
 }