Esempio n. 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");
         }
     }
 }
Esempio n. 2
0
 void pressedGreenCenter()
 {
     if (!(moduleSolved))
     {
         Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
         Vector3 pos = buttonMesh[6].transform.localPosition;
         pos.y = 0.0126f;
         buttonMesh[6].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
         if (flag)
         {
             flag = false;
             foreach (int i in buttonIndex)
             {
                 Vector3 pos2 = buttonMesh[i].transform.localPosition;
                 pos2.y = 0.0169f;
                 buttonMesh[i].transform.localPosition = new Vector3(pos2.x, pos2.y, pos2.z);
                 hexButtons[i].OnInteract      = delegate { pressedGreen(i); return(false); };
                 hexButtons[i].OnInteractEnded = delegate { pressedGreenRelease(i); };
                 ledMesh[i].material           = ledColors[0];
             }
         }
         else
         {
             flag             = true;
             numButtonPresses = 0;
             foreach (int i in buttonIndex)
             {
                 hexButtons[i].OnInteract      = delegate { pressedGreenSubmit(i); return(false); };
                 hexButtons[i].OnInteractEnded = null;
             }
             coloredHexabuttons.StartCoroutine(greenFlasher());
         }
     }
 }
Esempio n. 3
0
 void pressedWhiteCenter()
 {
     if (!(moduleSolved))
     {
         foreach (int i in buttonIndex)
         {
             Vector3 pos2 = buttonMesh[i].transform.localPosition;
             pos2.y = 0.0169f;
             buttonMesh[i].transform.localPosition = new Vector3(pos2.x, pos2.y, pos2.z);
             buttonMesh[i].material         = buttonColors[6];
             hexButtons[i].OnHighlight      = null;
             hexButtons[i].OnHighlightEnded = null;
             hexButtons[i].OnInteract       = null;
             ledMesh[i].material            = ledColors[0];
         }
         numButtonPresses               = 0;
         hexButtons[6].OnHighlight      = null;
         hexButtons[6].OnHighlightEnded = null;
         buttonMesh[6].material         = buttonColors["ROYGBP".IndexOf(whiteBHC[6])];
         Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
         Vector3 pos = buttonMesh[6].transform.localPosition;
         pos.y = 0.0126f;
         buttonMesh[6].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
         hexButtons[6].OnInteract = null;
         coloredHexabuttons.StartCoroutine(whiteFlasher());
     }
 }
 void pressedYellowCenter()
 {
     if (!(moduleSolved))
     {
         Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
         Vector3 pos = buttonMesh[6].transform.localPosition;
         pos.y = 0.0126f;
         buttonMesh[6].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
         coloredHexabuttons.StartCoroutine(playAudio());
     }
 }
Esempio n. 5
0
    public void run()
    {
        Debug.LogFormat("[Colored Hexabuttons #{0}] Color Generated: Black", moduleId);
        string alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";

        string[] morse =
        {
            ".-",    "-...",  "-.-.",  "-..",   ".",     "..-.",  "--.",   "....",  "..",    ".---", "-.-",  ".-..", "--",
            "-.",    "---",   ".--.",  "--.-",  ".-.",   "...",   "-",     "..-",   "...-",  ".--",  "-..-", "-.--", "--..",
            "-----", ".----", "..---", "...--", "....-", ".....", "-....", "--...", "---..", "----."
        };
        string[] letterTable =
        {
            "LHTGWYRAQPJZODKXVFESCBMIUN9816347502",
            "UPQCOTBEXAHYIRLKZMFDSJGNVW5209734816",
            "TWIZYBASJONUDFVRXQGCHEKMPL8047269135",
            "FXOKZWPLMNCDQHGBISTYRAUJEV2438571690",
            "JOPQFGTDRVMSXLZWACNHBUYKIE1972805364",
            "ZCMWHONFDKBGVQXLTJRIEYAUSP4685923071"
        };
        int[] buttonTable =
        {
            4, 1, 0, 3, 5, 2,
            2, 5, 3, 1, 4, 0,
            3, 0, 1, 5, 2, 4,
            0, 4, 5, 2, 1, 3,
            1, 3, 2, 4, 0, 5,
            5, 2, 4, 0, 3, 1
        };
        string letters = "";

        blackMorse = new string[6];
        foreach (int i in buttonIndex)
        {
            letters = letters + "" + alpha[UnityEngine.Random.Range(0, alpha.Length)];
            Debug.LogFormat("[Colored Hexabuttons #{0}] {1} button is transmitting {2}", moduleId, positions[i], letters[i]);
            blackMorse[i]            = morse[alpha.IndexOf(letters[i])];
            hexButtons[i].OnInteract = delegate { coloredHexabuttons.StartCoroutine(pressedBlack(i)); return(false); };
        }
        blackLights = new int[7];
        foreach (int i in buttonIndex)
        {
            blackLights[i]                 = UnityEngine.Random.Range(0, 6);
            hexButtons[i].OnHighlight      = delegate { ledMesh[blackLights[i]].material = ledColors[2]; };
            hexButtons[i].OnHighlightEnded = delegate { ledMesh[blackLights[i]].material = ledColors[0]; };
        }
        blackLights[6]                 = UnityEngine.Random.Range(0, 6);
        hexButtons[6].OnHighlight      = delegate { ledMesh[blackLights[6]].material = ledColors[2]; };
        hexButtons[6].OnHighlightEnded = delegate { ledMesh[blackLights[6]].material = ledColors[0]; };
        blackButtonSeq                 = new ArrayList();
        blackButtonSeq.Add(blackLights[6]);
        string temp = letters[(int)blackButtonSeq[0]] + "";

        while (blackButtonSeq.Count < 6)
        {
            int row   = ((int)blackButtonSeq[blackButtonSeq.Count - 1]) * 6;
            int col   = blackLights[((int)blackButtonSeq[blackButtonSeq.Count - 1])];
            int index = row + col;
            while (blackButtonSeq.Contains(buttonTable[index]))
            {
                index = (index + 1) % buttonTable.Length;
            }
            blackButtonSeq.Add(buttonTable[index]);
            temp = temp + "" + letters[(int)blackButtonSeq[blackButtonSeq.Count - 1]];
        }
        letters = temp.ToUpperInvariant();
        Debug.LogFormat("[Colored Hexabuttons #{0}] Order for the buttons to be read: {1}, {2}, {3}, {4}, {5}, {6}", moduleId, positions[(int)blackButtonSeq[0]], positions[(int)blackButtonSeq[1]], positions[(int)blackButtonSeq[2]], positions[(int)blackButtonSeq[3]], positions[(int)blackButtonSeq[4]], positions[(int)blackButtonSeq[5]]);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Character Sequence: {1}", moduleId, letters);
        temp     = "";
        solution = new int[12];
        for (int aa = 0; aa < 6; aa++)
        {
            temp                   = temp + "" + letterTable[(int)blackButtonSeq[aa]][alpha.IndexOf(letters[aa])];
            solution[aa * 2]       = (alpha.IndexOf(temp[aa]) / 6) + 1;
            solution[(aa * 2) + 1] = (alpha.IndexOf(temp[aa]) % 6) + 1;
            Debug.LogFormat("[Colored Hexabuttons #{0}] {1} -> {2} -> {3}{4}", moduleId, letters[aa], temp[aa], solution[aa * 2], solution[(aa * 2) + 1]);
        }
        numButtonPresses              = 0;
        hexButtons[6].OnInteract      = delegate { pressedBlackCenter(); return(false); };
        hexButtons[6].OnInteractEnded = delegate { releasedBlackCenter(); };
        lights[6].color     = Color.white;
        lights[6].intensity = 30;
        lights[6].range     = 0.020f;
        flag = false;
    }
    public void run()
    {
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated Color: Purple", moduleId);
        int[][] bins =
        {
            new int[] { 1, 1, 1, 1, 1, 1 },
            new int[] { 1, 1, 1, 1, 1, 1 },
            new int[] { 0, 0, 0, 0, 0, 0 },
        };
        string pos1 = "012345";
        string pos0 = "";
        int    num0 = UnityEngine.Random.Range(2, 5);

        for (int aa = 0; aa < num0; aa++)
        {
            pos0 = pos0 + "" + pos1[UnityEngine.Random.Range(0, pos1.Length)];
            bins[0][pos0[aa] - '0'] = 0;
            pos1 = pos1.Replace(pos0[aa] + "", "");
        }
        string pos2 = "012345";

        for (int aa = 0; aa < 2; aa++)
        {
            int n = pos0[UnityEngine.Random.Range(0, pos0.Length)] - '0';
            bins[1][n] = aa;
            pos0       = pos0.Replace(n + "", "");
            pos2       = pos2.Replace(n + "", "");
        }
        for (int aa = 0; aa < 2; aa++)
        {
            int n = pos1[UnityEngine.Random.Range(0, pos1.Length)] - '0';
            bins[1][n] = aa;
            pos1       = pos1.Replace(n + "", "");
            pos2       = pos2.Replace(n + "", "");
        }
        num0 = UnityEngine.Random.Range(0, 3);
        for (int aa = 0; aa < num0; aa++)
        {
            int n = pos2[UnityEngine.Random.Range(0, pos2.Length)] - '0';
            bins[1][n] = 0;
            pos2       = pos2.Replace(n + "", "");
        }
        string[] opers = { "AND", "OR", "XOR", "NAND", "NOR", "XNOR", "->", "<-" };
        int      oper  = UnityEngine.Random.Range(0, 8);

        for (int aa = 0; aa < 6; aa++)
        {
            switch (oper)
            {
            case 0:                    //AND
                if (bins[0][aa] == 1 && bins[1][aa] == 1)
                {
                    bins[2][aa] = 1;
                }
                break;

            case 1:                    //OR
                if (bins[0][aa] == 1 || bins[1][aa] == 1)
                {
                    bins[2][aa] = 1;
                }
                break;

            case 2:                    //XOR
                if (bins[0][aa] != bins[1][aa])
                {
                    bins[2][aa] = 1;
                }
                break;

            case 3:                    //NAND
                if (!(bins[0][aa] == 1 && bins[1][aa] == 1))
                {
                    bins[2][aa] = 1;
                }
                break;

            case 4:                    //NOR
                if (!(bins[0][aa] == 1 || bins[1][aa] == 1))
                {
                    bins[2][aa] = 1;
                }
                break;

            case 5:                    //XNOR
                if (bins[0][aa] == bins[1][aa])
                {
                    bins[2][aa] = 1;
                }
                break;

            case 6:                    //->
                if (bins[1][aa] == 1 || bins[0][aa] == 0)
                {
                    bins[2][aa] = 1;
                }
                break;

            default:                    //<-
                if (bins[0][aa] == 1 || bins[1][aa] == 0)
                {
                    bins[2][aa] = 1;
                }
                break;
            }
        }
        int[] numbers = { 0, 0, 0 };
        for (int aa = 0; aa < 6; aa++)
        {
            for (int bb = 0; bb < 3; bb++)
            {
                if (bins[bb][aa] == 1)
                {
                    switch (aa)
                    {
                    case 0:
                        numbers[bb] += 32;
                        break;

                    case 1:
                        numbers[bb] += 16;
                        break;

                    case 2:
                        numbers[bb] += 8;
                        break;

                    case 3:
                        numbers[bb] += 4;
                        break;

                    case 4:
                        numbers[bb] += 2;
                        break;

                    default:
                        numbers[bb] += 1;
                        break;
                    }
                }
            }
        }
        voiceMessage = new string[6];
        for (int aa = 0; aa < 3; aa++)
        {
            if (numbers[aa] < 10)
            {
                voiceMessage[aa * 2]       = "0";
                voiceMessage[(aa * 2) + 1] = numbers[aa] + "";
            }
            else
            {
                voiceMessage[aa * 2]       = (numbers[aa] / 10) + "";
                voiceMessage[(aa * 2) + 1] = (numbers[aa] % 10) + "";
            }
        }
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated 6 digit number: {1}{2}{3}{4}{5}{6}", moduleId, voiceMessage[0], voiceMessage[1], voiceMessage[2], voiceMessage[3], voiceMessage[4], voiceMessage[5]);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated left binary: {1}{2}{3}{4}{5}{6}", moduleId, bins[0][0], bins[0][1], bins[0][2], bins[0][3], bins[0][4], bins[0][5]);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated right binary: {1}{2}{3}{4}{5}{6}", moduleId, bins[1][0], bins[1][1], bins[1][2], bins[1][3], bins[1][4], bins[1][5]);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Resulting binary: {1}{2}{3}{4}{5}{6}", moduleId, bins[2][0], bins[2][1], bins[2][2], bins[2][3], bins[2][4], bins[2][5]);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Logic operator used: {1}", moduleId, opers[oper]);
        hexButtons[6].OnInteract = delegate { pressedPurpleCenter(); return(false); };
        solution         = new int[6];
        numButtonPresses = 0;
        for (int aa = 0; aa < 10; aa++)
        {
            for (int bb = 0; bb < 6; bb++)
            {
                if (aa == voiceMessage[bb][0] - '0')
                {
                    solution[bb] = numButtonPresses + 0;
                    numButtonPresses++;
                    if (numButtonPresses == 6)
                    {
                        break;
                    }
                }
            }
            if (numButtonPresses == 6)
            {
                break;
            }
        }
        Debug.LogFormat("[Colored Hexabuttons #{0}] Buttons to be read in this order: {1} {2} {3} {4} {5} {6}", moduleId, positions[solution[0]], positions[solution[1]], positions[solution[2]], positions[solution[3]], positions[solution[4]], positions[solution[5]]);
        numbers[0] = 0;
        numbers[1] = 0;
        numbers[2] = 0;
        for (int aa = 0; aa < 6; aa++)
        {
            bins[0][aa] = UnityEngine.Random.Range(0, 2);
            bins[1][aa] = UnityEngine.Random.Range(0, 2);
            bins[2][aa] = 0;
            switch (oper)
            {
            case 0:                    //AND
                if (bins[0][aa] == 1 && bins[1][aa] == 1)
                {
                    bins[2][aa] = 1;
                }
                break;

            case 1:                    //OR
                if (bins[0][aa] == 1 || bins[1][aa] == 1)
                {
                    bins[2][aa] = 1;
                }
                break;

            case 2:                    //XOR
                if (bins[0][aa] != bins[1][aa])
                {
                    bins[2][aa] = 1;
                }
                break;

            case 3:                    //NAND
                if (!(bins[0][aa] == 1 && bins[1][aa] == 1))
                {
                    bins[2][aa] = 1;
                }
                break;

            case 4:                    //NOR
                if (!(bins[0][aa] == 1 || bins[1][aa] == 1))
                {
                    bins[2][aa] = 1;
                }
                break;

            case 5:                    //XNOR
                if (bins[0][aa] == bins[1][aa])
                {
                    bins[2][aa] = 1;
                }
                break;

            case 6:                    //->
                if (bins[1][aa] == 1 || bins[0][aa] == 0)
                {
                    bins[2][aa] = 1;
                }
                break;

            default:                    //<-
                if (bins[0][aa] == 1 || bins[1][aa] == 0)
                {
                    bins[2][aa] = 1;
                }
                break;
            }
            for (int bb = 0; bb < 3; bb++)
            {
                if (bins[bb][aa] == 1)
                {
                    switch (aa)
                    {
                    case 0:
                        numbers[bb] += 32;
                        break;

                    case 1:
                        numbers[bb] += 16;
                        break;

                    case 2:
                        numbers[bb] += 8;
                        break;

                    case 3:
                        numbers[bb] += 4;
                        break;

                    case 4:
                        numbers[bb] += 2;
                        break;

                    default:
                        numbers[bb] += 1;
                        break;
                    }
                }
            }
        }
        string randomAlpha = "VOT6C8GU9NJRAX3Q5DM12FPEBZKYW7SLIH40";

        foreach (int i in buttonIndex)
        {
            int n;
            switch (bins[0][i] + "" + bins[1][i])
            {
            case "00":
                n = 0;
                break;

            case "01":
                n = 1;
                break;

            case "10":
                n = 2;
                break;

            default:
                n = 3;
                break;
            }
            buttonText[solution[i]].text = randomAlpha[n + (4 * UnityEngine.Random.Range(0, 9))] + "";
        }
        string numberDigits = "";

        for (int aa = 0; aa < 3; aa++)
        {
            if (numbers[aa] < 10)
            {
                numberDigits = numberDigits + "0" + numbers[aa];
            }
            else
            {
                numberDigits = numberDigits + "" + numbers[aa];
            }
        }
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated text on buttons in reading order: {1}{2}{3}{4}{5}{6}", moduleId, buttonText[0].text, buttonText[1].text, buttonText[2].text, buttonText[3].text, buttonText[4].text, buttonText[5].text);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated left binary: {1}{2}{3}{4}{5}{6}", moduleId, bins[0][0], bins[0][1], bins[0][2], bins[0][3], bins[0][4], bins[0][5]);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated right binary: {1}{2}{3}{4}{5}{6}", moduleId, bins[1][0], bins[1][1], bins[1][2], bins[1][3], bins[1][4], bins[1][5]);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Resulting binary: {1}{2}{3}{4}{5}{6}", moduleId, bins[2][0], bins[2][1], bins[2][2], bins[2][3], bins[2][4], bins[2][5]);
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated 6 digit number: {1}", moduleId, numberDigits);
        numButtonPresses = 0;
        for (int aa = 0; aa < 10; aa++)
        {
            for (int bb = 0; bb < 6; bb++)
            {
                if (aa == numberDigits[bb] - '0')
                {
                    solution[bb] = numButtonPresses + 0;
                    numButtonPresses++;
                    if (numButtonPresses == 6)
                    {
                        break;
                    }
                }
            }
            if (numButtonPresses == 6)
            {
                break;
            }
        }
        Debug.LogFormat("[Colored Hexabuttons #{0}] Solution: {1} {2} {3} {4} {5} {6}", moduleId, positions[solution[0]], positions[solution[1]], positions[solution[2]], positions[solution[3]], positions[solution[4]], positions[solution[5]]);
        numButtonPresses = 0;
        foreach (int i in buttonIndex)
        {
            hexButtons[i].OnInteract = delegate { pressedPurple(i); return(false); }
        }
        ;
    }

    void pressedPurple(int n)
    {
        if (!(moduleSolved))
        {
            Debug.LogFormat("[Colored Hexabuttons #{0}] User pressed {1}.", moduleId, positions[n]);
            Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
            if (solution[numButtonPresses] == n)
            {
                Vector3 pos = buttonMesh[n].transform.localPosition;
                pos.y = 0.0126f;
                buttonMesh[n].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                hexButtons[n].OnInteract = null;
                ledMesh[n].material      = ledColors[1];
                numButtonPresses++;
                if (numButtonPresses == 6)
                {
                    moduleSolved = true;
                    coloredHexabuttons.Solve();
                }
            }
            else
            {
                Debug.LogFormat("[Colored Hexabuttons #{0}] Strike! I was expecting the {1} button!", moduleId, positions[solution[numButtonPresses]]);
                coloredHexabuttons.Strike();
                foreach (int i in buttonIndex)
                {
                    Vector3 pos = buttonMesh[i].transform.localPosition;
                    pos.y = 0.0169f;
                    buttonMesh[i].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                    hexButtons[i].OnInteract = delegate { pressedPurple(i); return(false); };
                    ledMesh[i].material      = ledColors[0];
                }
                numButtonPresses = 0;
            }
        }
    }

    void pressedPurpleCenter()
    {
        if (!(moduleSolved))
        {
            Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
            Vector3 pos = buttonMesh[6].transform.localPosition;
            pos.y = 0.0126f;
            buttonMesh[6].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
            coloredHexabuttons.StartCoroutine(playAudio());
        }
    }

    IEnumerator playAudio()
    {
        hexButtons[6].OnInteract = null;
        yield return(new WaitForSeconds(0.5f));

        for (int aa = 0; aa < voiceMessage.Length; aa++)
        {
            Audio.PlaySoundAtTransform(voiceMessage[aa], transform);
            yield return(new WaitForSeconds(1.5f));
        }
        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);
        hexButtons[6].OnInteract = delegate { pressedPurpleCenter(); return(false); };
    }
}
    public void run()
    {
        numButtonPresses = 0;
        moduleSolved     = false;
        Debug.LogFormat("[Colored Hexabuttons #{0}] Color Generated: Orange", moduleId);
        string[] wordList =
        {
            "ABACUS", "ACTION", "ADVICE", "AFFECT", "AGENCY", "ALMOND", "AMOUNT", "ANARCH", "APPEAR", "ARRIVE",
            "BALLAD", "BAKERY", "BEACON", "BINARY", "BLEACH", "BRONZE", "BOXING", "BREEZE", "BELIEF", "BITTER",
            "CACTUS", "CEREAL", "CHERRY", "CITRUS", "CLOSET", "COFFEE", "CRISIS", "CURSOR", "CONVEX", "CELLAR",
            "DANGER", "DEBRIS", "DINNER", "DOODLE", "DRIVER", "DUSTER", "DEFEAT", "DIRECT", "DOMINO", "DRAWER",
            "EASTER", "EDITOR", "EFFECT", "EGGNOG", "EMBLEM", "ENROLL", "EQUALS", "ERASER", "ESCAPE", "EXPERT",
            "FABRIC", "FELINE", "FILTER", "FLAVOR", "FOREST", "FREEZE", "FUTURE", "FACADE", "FOLLOW", "FINISH",
            "GALLON", "GEYSER", "GALAXY", "GLANCE", "GROWTH", "GUTTER", "GAMBLE", "GERBIL", "GINGER", "GIVING",
            "HAMMER", "HEIGHT", "HIDING", "HOLLOW", "HUNTER", "HYBRID", "HANDLE", "HELMET", "HAZARD", "HURDLE",
            "ICICLE", "IMPORT", "INSERT", "ITALIC", "IMPAIR", "INCOME", "IMPACT", "INSULT", "INSECT", "INTENT",
            "JESTER", "JINGLE", "JOGGER", "JUNGLE", "JERSEY", "JOCKEY", "JUGGLE", "JUMBLE", "JUNIOR", "JAILER",
            "KETTLE", "KIDNEY", "KNIGHT", "KENNEL", "KINGLY", "KITTEN", "KRAKEN", "KINDLY", "KERNEL", "KEEPER",
            "LAGOON", "LEADER", "LIMBER", "LOCKET", "LUXURY", "LYCHEE", "LADDER", "LEGACY", "LIQUID", "LOTION",
            "MAGNET", "MEADOW", "MIDDLE", "MOMENT", "MUSEUM", "MYSTIC", "MATRIX", "MELODY", "MIRROR", "MUFFIN",
            "NAPKIN", "NEEDLE", "NICKEL", "NOBODY", "NUTMEG", "NATION", "NECTAR", "NINETY", "NOTICE", "NARROW",
            "OBJECT", "OCELOT", "OFFICE", "OPTION", "ORANGE", "OUTPUT", "OXYGEN", "OYSTER", "OFFSET", "OUTFIT",
            "PALACE", "PEBBLE", "PICNIC", "PLAQUE", "POCKET", "PROFIT", "PUDDLE", "PENCIL", "PIGEON", "POETRY",
            "QUARTZ", "QUIVER", "QUARRY", "QUEASY", "RABBIT", "REFLEX", "RHYTHM", "RIBBON", "ROCKET", "RAFFLE",
            "RECIPE", "RUBBER", "RADIUS", "RECORD", "SAILOR", "SCHEME", "SEARCH", "SHADOW", "SIGNAL", "SLEIGH",
            "SMUDGE", "SNEEZE", "SOCIAL", "SQUEAK", "TAILOR", "TEACUP", "THIRST", "TICKET", "TOGGLE", "TRAVEL",
            "TUNNEL", "TWITCH", "TEMPLE", "THEORY", "UNISON", "UPWARD", "UTMOST", "UTOPIA", "UNIQUE", "UNREST",
            "UNSEEN", "UNWRAP", "UNVIEL", "UPHOLD", "VACUUM", "VECTOR", "VIEWER", "VORTEX", "VALLEY", "VERBAL",
            "VICTIM", "VOLUME", "VANISH", "VERMIN", "WAFFLE", "WEALTH", "WHEEZE", "WIDGET", "WOLVES", "WRENCH",
            "WALNUT", "WEIGHT", "WISDOM", "WONDER", "YEARLY", "YELLOW", "YONDER", "ZEALOT", "ZEBRAS", "ZODIAC"
        };
        string temp = wordList[UnityEngine.Random.Range(0, wordList.Length)].ToUpper();

        solution = temp.ToUpper();
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated Word: {1}", moduleId, solution);
        scramble = "";
        for (int aa = 0; aa < 6; aa++)
        {
            int pos = UnityEngine.Random.Range(0, temp.Length);
            scramble = scramble + "" + temp[pos];
            temp     = temp.Remove(pos, 1);
        }
        Debug.LogFormat("[Colored Hexabuttons #{0}] Scrambled Word: {1}", moduleId, scramble);
        foreach (int i in buttonIndex)
        {
            hexButtons[i].OnInteract = delegate { pressedOrange(i); return(false); }
        }
        ;
        hexButtons[6].OnInteract = delegate { pressedOrangeCenter(); return(false); };
        string alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

        switch (UnityEngine.Random.Range(0, 7))
        {
        case 0:                //Atbash

            voiceMessage    = new string[1];
            voiceMessage[0] = "ATBASH";
            for (int aa = 0; aa < 6; aa++)
            {
                buttonText[aa].color = Color.black;
                buttonText[aa].text  = alpha[25 - alpha.IndexOf(scramble[aa])] + "";
            }
            Debug.LogFormat("[Colored Hexabuttons #{0}] Encryption using ATBASH: {1}{2}{3}{4}{5}{6}", moduleId, buttonText[0].text, buttonText[1].text, buttonText[2].text, buttonText[3].text, buttonText[4].text, buttonText[5].text);
            break;

        case 1:                //Caesar
            voiceMessage    = new string[3];
            voiceMessage[0] = "CAESAR";
            int r1 = UnityEngine.Random.Range(1, 26);
            if (r1 < 10)
            {
                voiceMessage[1] = "0";
                voiceMessage[2] = r1 + "";
            }
            else
            {
                voiceMessage[1] = (r1 / 10) + "";
                voiceMessage[2] = (r1 % 10) + "";
            }
            for (int aa = 0; aa < 6; aa++)
            {
                buttonText[aa].color = Color.black;
                buttonText[aa].text  = alpha[mod(alpha.IndexOf(scramble[aa]) - r1, 26)] + "";
            }
            Debug.LogFormat("[Colored Hexabuttons #{0}] Encryption using CAESAR {1}{2}: {3}{4}{5}{6}{7}{8}", moduleId, voiceMessage[1], voiceMessage[2], buttonText[0].text, buttonText[1].text, buttonText[2].text, buttonText[3].text, buttonText[4].text, buttonText[5].text);
            break;

        case 2:                //Condi
            voiceMessage    = new string[3];
            voiceMessage[0] = "CONDI";
            int r2 = UnityEngine.Random.Range(1, 26);
            if (r2 < 10)
            {
                voiceMessage[1] = "0";
                voiceMessage[2] = r2 + "";
            }
            else
            {
                voiceMessage[1] = (r2 / 10) + "";
                voiceMessage[2] = (r2 % 10) + "";
            }
            for (int aa = 0; aa < 6; aa++)
            {
                buttonText[aa].color = Color.black;
                buttonText[aa].text  = alpha[mod(alpha.IndexOf(scramble[aa]) + r2, 26)] + "";
                r2 = alpha.IndexOf(scramble[aa]) + 1;
            }
            Debug.LogFormat("[Colored Hexabuttons #{0}] Encryption using CONDI {1}{2}: {3}{4}{5}{6}{7}{8}", moduleId, voiceMessage[1], voiceMessage[2], buttonText[0].text, buttonText[1].text, buttonText[2].text, buttonText[3].text, buttonText[4].text, buttonText[5].text);
            break;

        case 3:                //Monoalphabetic
            voiceMessage    = new string[7];
            voiceMessage[0] = "MONOALPHABETIC";
            temp            = alpha.ToUpper();
            for (int aa = 1; aa < 7; aa++)
            {
                voiceMessage[aa] = temp[UnityEngine.Random.Range(0, temp.Length)] + "";
                temp             = temp.Replace(voiceMessage[aa], "");
            }
            for (int aa = 6; aa >= 1; aa--)
            {
                temp = voiceMessage[aa] + "" + temp;
            }
            for (int aa = 0; aa < 6; aa++)
            {
                buttonText[aa].color = Color.black;
                buttonText[aa].text  = temp[alpha.IndexOf(scramble[aa])] + "";
            }
            Debug.LogFormat("[Colored Hexabuttons #{0}] Encryption using MONOALPHABETIC {1}{2}{3}{4}{5}{6}: {7}{8}{9}{10}{11}{12}", moduleId, voiceMessage[1], voiceMessage[2], voiceMessage[3], voiceMessage[4], voiceMessage[5], voiceMessage[6], buttonText[0].text, buttonText[1].text, buttonText[2].text, buttonText[3].text, buttonText[4].text, buttonText[5].text);
            break;

        case 4:                //Porta
            voiceMessage    = new string[7];
            voiceMessage[0] = "PORTA";
            temp            = alpha.ToUpper();
            for (int aa = 1; aa < 7; aa++)
            {
                voiceMessage[aa] = temp[UnityEngine.Random.Range(0, temp.Length)] + "";
                temp             = temp.Replace(voiceMessage[aa], "");
            }
            string[] portaChart =
            {
                "NOPQRSTUVWXYZ",
                "OPQRSTUVWXYZN",
                "PQRSTUVWXYZNO",
                "QRSTUVWXYZNOP",
                "RSTUVWXYZNOPQ",
                "STUVWXYZNOPQR",
                "TUVWXYZNOPQRS",
                "UVWXYZNOPQRST",
                "VWXYZNOPQRSTU",
                "WXYZNOPQRSTUV",
                "XYZNOPQRSTUVW",
                "YZNOPQRSTUVWX",
                "ZNOPQRSTUVWXY"
            };
            for (int aa = 0; aa < 6; aa++)
            {
                buttonText[aa].color = Color.black;
                if (alpha.IndexOf(scramble[aa]) < 13)
                {
                    buttonText[aa].text = portaChart[alpha.IndexOf(voiceMessage[aa + 1]) / 2][alpha.IndexOf(scramble[aa])] + "";
                }
                else
                {
                    buttonText[aa].text = alpha[portaChart[alpha.IndexOf(voiceMessage[aa + 1]) / 2].IndexOf(scramble[aa])] + "";
                }
            }
            Debug.LogFormat("[Colored Hexabuttons #{0}] Encryption using PORTA {1}{2}{3}{4}{5}{6}: {7}{8}{9}{10}{11}{12}", moduleId, voiceMessage[1], voiceMessage[2], voiceMessage[3], voiceMessage[4], voiceMessage[5], voiceMessage[6], buttonText[0].text, buttonText[1].text, buttonText[2].text, buttonText[3].text, buttonText[4].text, buttonText[5].text);
            break;

        case 5:                //Ragbaby
            voiceMessage    = new string[3];
            voiceMessage[0] = "RAGBABY";
            int r3 = UnityEngine.Random.Range(0, 26);
            if (r3 < 10)
            {
                voiceMessage[1] = "0";
                voiceMessage[2] = r3 + "";
            }
            else
            {
                voiceMessage[1] = (r3 / 10) + "";
                voiceMessage[2] = (r3 % 10) + "";
            }
            for (int aa = 0; aa < 6; aa++)
            {
                buttonText[aa].color = Color.black;
                buttonText[aa].text  = alpha[mod(alpha.IndexOf(scramble[aa]) + r3, 26)] + "";
                r3++;
            }
            Debug.LogFormat("[Colored Hexabuttons #{0}] Encryption using RAGBABY {1}{2}: {3}{4}{5}{6}{7}{8}", moduleId, voiceMessage[1], voiceMessage[2], buttonText[0].text, buttonText[1].text, buttonText[2].text, buttonText[3].text, buttonText[4].text, buttonText[5].text);
            break;

        default:                //Vigenere
            voiceMessage    = new string[7];
            voiceMessage[0] = "VIGENERE";
            temp            = alpha.ToUpper();
            string alpha2 = "-ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            for (int aa = 1; aa < 7; aa++)
            {
                voiceMessage[aa] = temp[UnityEngine.Random.Range(0, temp.Length)] + "";
                temp             = temp.Replace(voiceMessage[aa], "");
                int r4 = alpha2.IndexOf(scramble[aa - 1]) + alpha2.IndexOf(voiceMessage[aa]);
                while (r4 > 26)
                {
                    r4 -= 26;
                }
                buttonText[aa - 1].color = Color.black;
                buttonText[aa - 1].text  = alpha2[r4] + "";
            }
            Debug.LogFormat("[Colored Hexabuttons #{0}] Encryption using VIGENERE {1}{2}{3}{4}{5}{6}: {7}{8}{9}{10}{11}{12}", moduleId, voiceMessage[1], voiceMessage[2], voiceMessage[3], voiceMessage[4], voiceMessage[5], voiceMessage[6], buttonText[0].text, buttonText[1].text, buttonText[2].text, buttonText[3].text, buttonText[4].text, buttonText[5].text);
            break;
        }
    }

    void pressedOrange(int n)
    {
        if (!(moduleSolved))
        {
            Debug.LogFormat("[Colored Hexabuttons #{0}] User pressed {1}. Which is the decrypted letter {2}.", moduleId, positions[n], scramble[n]);
            Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
            if (solution[numButtonPresses] == scramble[n])
            {
                Vector3 pos = buttonMesh[n].transform.localPosition;
                pos.y = 0.0126f;
                buttonMesh[n].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                hexButtons[n].OnInteract = null;
                ledMesh[n].material      = ledColors[1];
                if (numButtonPresses == 5)
                {
                    moduleSolved = true;
                    coloredHexabuttons.Solve();
                }
                else
                {
                    numButtonPresses++;
                }
            }
            else
            {
                numButtonPresses = 0;
                Debug.LogFormat("[Colored Hexabuttons #{0}] Strike! I was expecting {1}!", moduleId, solution[numButtonPresses]);
                coloredHexabuttons.Strike();
                for (int aa = 0; aa < 6; aa++)
                {
                    Vector3 pos = buttonMesh[aa].transform.localPosition;
                    pos.y = 0.0169f;
                    buttonMesh[aa].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                    ledMesh[aa].material = ledColors[0];
                }
                foreach (int i in buttonIndex)
                {
                    hexButtons[i].OnInteract = delegate { pressedOrange(i); return(false); }
                }
                ;
            }
        }
    }

    void pressedOrangeCenter()
    {
        if (!(moduleSolved))
        {
            Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
            Vector3 pos = buttonMesh[6].transform.localPosition;
            pos.y = 0.0126f;
            buttonMesh[6].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
            coloredHexabuttons.StartCoroutine(playAudio());
        }
    }

    IEnumerator playAudio()
    {
        hexButtons[6].OnInteract = null;
        yield return(new WaitForSeconds(0.5f));

        for (int aa = 0; aa < voiceMessage.Length; aa++)
        {
            Audio.PlaySoundAtTransform(voiceMessage[aa], transform);
            yield return(new WaitForSeconds(1.5f));
        }
        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);
        hexButtons[6].OnInteract = delegate { pressedOrangeCenter(); return(false); };
    }

    private int mod(int n, int m)
    {
        while (n < 0)
        {
            n += 26;
        }
        return(n % 26);
    }
}
    void pressedBrown(int n, int c)
    {
        if (!(moduleSolved))
        {
            Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
            string results;
            if (flip == -1)
            {
                string[] r = { getResult(chemicals[c], chemicals[absent[0]]), getResult(chemicals[c], chemicals[absent[1]]) };
                if (r[0].Equals(solution[numButtonPresses]) && r[1].Equals(solution[numButtonPresses]))
                {
                    flip    = -1;
                    results = getResult(chemicals[c], chemicals[absent[0]]);
                }
                else if (r[0].Equals(solution[numButtonPresses]))
                {
                    flip    = 0;
                    results = getResult(chemicals[c], chemicals[absent[0]]);
                }
                else
                {
                    flip    = 1;
                    results = getResult(chemicals[c], chemicals[absent[1]]);
                }
            }
            else
            {
                results = getResult(chemicals[c], chemicals[absent[flip]]);
            }
            Debug.LogFormat("[Colored Hexabuttons #{0}] User pressed {1}! This creates a {2}", moduleId, positions[n], results);
            if (results.Equals(solution[numButtonPresses]))
            {
                Vector3 pos = buttonMesh[n].transform.localPosition;
                pos.y = 0.0126f;
                buttonMesh[n].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                hexButtons[n].OnInteract = null;
                ledMesh[n].material      = ledColors[1];
                numButtonPresses++;
                flip = (flip + 1) % 2;
                if (numButtonPresses == 6)
                {
                    moduleSolved = true;
                    coloredHexabuttons.Solve();
                }
            }
            else
            {
                Debug.LogFormat("[Colored Hexabuttons #{0}] Strike! I was expecting {1}!", moduleId, solution[numButtonPresses]);
                coloredHexabuttons.Strike();
                numButtonPresses = 0;
                flip             = -1;
                for (int aa = 0; aa < 6; aa++)
                {
                    Vector3 pos = buttonMesh[aa].transform.localPosition;
                    pos.y = 0.0169f;
                    buttonMesh[aa].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                    ledMesh[aa].material = ledColors[0];
                }
                foreach (int i in buttonIndex)
                {
                    hexButtons[i].OnInteract = delegate { pressedBrown(i, present[i]); return(false); }
                }
                ;
            }
        }
    }

    string getResult(string c1, string c2)
    {
        for (int aa = 0; aa < 3; aa++)
        {
            if (c1[aa * 2] != c2[aa * 2] && c1[(aa * 2) + 1] == c2[(aa * 2) + 1])
            {
                return("RGB"[aa] + "" + c1[(aa * 2) + 1]);
            }
        }
        return("N");
    }

    void pressedBrownCenter()
    {
        if (!(moduleSolved))
        {
            Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
            Vector3 pos = buttonMesh[6].transform.localPosition;
            pos.y = 0.0126f;
            buttonMesh[6].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
            coloredHexabuttons.StartCoroutine(playAudio());
            numButtonPresses = 0;
            flip             = -1;
            for (int aa = 0; aa < 6; aa++)
            {
                pos   = buttonMesh[aa].transform.localPosition;
                pos.y = 0.0169f;
                buttonMesh[aa].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                ledMesh[aa].material = ledColors[0];
            }
            foreach (int i in buttonIndex)
            {
                hexButtons[i].OnInteract = delegate { pressedBrown(i, present[i]); return(false); }
            }
            ;
        }
    }

    IEnumerator playAudio()
    {
        hexButtons[6].OnInteract = null;
        yield return(new WaitForSeconds(0.5f));

        for (int aa = 0; aa < voiceMessage.Length; aa++)
        {
            Audio.PlaySoundAtTransform(voiceMessage[aa], transform);
            yield return(new WaitForSeconds(1.5f));
        }
        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);
        hexButtons[6].OnInteract = delegate { pressedBrownCenter(); return(false); };
    }
}
    public void run()
    {
        moduleSolved = false;
        Debug.LogFormat("[Colored Hexabuttons #{0}] Color Generated: Red", moduleId);
        foreach (int i in buttonIndex)
        {
            hexButtons[i].OnInteract = delegate { pressedRed(buttonIndex[i]); return(false); }
        }
        ;
        hexButtons[6].OnInteract = delegate { pressedRedCenter(); return(false); };
        int[][] chart =
        {
            new int[6] {
                2, 4, 5, 1, 0, 3
            },
            new int[6] {
                1, 5, 3, 0, 2, 4
            },
            new int[6] {
                5, 4, 3, 1, 2, 0
            },
            new int[6] {
                1, 0, 2, 3, 4, 5
            },
            new int[6] {
                3, 0, 1, 2, 5, 4
            },
            new int[6] {
                5, 0, 1, 2, 4, 3
            },
            new int[6] {
                4, 2, 3, 5, 0, 1
            },
            new int[6] {
                0, 4, 5, 1, 3, 2
            },
            new int[6] {
                0, 5, 3, 2, 1, 4
            },
            new int[6] {
                4, 3, 5, 1, 2, 0
            },
            new int[6] {
                2, 0, 3, 4, 5, 1
            },
            new int[6] {
                2, 5, 4, 3, 1, 0
            },
            new int[6] {
                3, 1, 0, 4, 2, 5
            },
            new int[6] {
                1, 4, 5, 2, 3, 0
            },
            new int[6] {
                3, 2, 4, 5, 0, 1
            },
            new int[6] {
                5, 2, 4, 3, 0, 1
            },
            new int[6] {
                5, 3, 2, 0, 1, 4
            },
            new int[6] {
                5, 1, 0, 4, 3, 2
            },
            new int[6] {
                4, 0, 1, 2, 3, 5
            },
            new int[6] {
                1, 3, 4, 5, 0, 2
            },
            new int[6] {
                3, 5, 2, 1, 4, 0
            },
            new int[6] {
                0, 1, 2, 3, 4, 5
            },
            new int[6] {
                0, 2, 1, 4, 5, 3
            },
            new int[6] {
                2, 1, 0, 5, 3, 4
            },
            new int[6] {
                4, 1, 0, 3, 5, 2
            },
            new int[6] {
                0, 3, 4, 5, 2, 1
            }
        };
        int pos1 = UnityEngine.Random.Range(0, chart.Length);
        int pos2 = UnityEngine.Random.Range(0, 6);

        voiceMessage = new string[2] {
            "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[pos1] + "", (pos2 + 1) + ""
        };
        Debug.LogFormat("[Colored Hexabuttons #{0}] Generated Message: {1}{2}", moduleId, voiceMessage[0], voiceMessage[1]);
        solution = new int[6];
        string output = "";

        for (int aa = 0; aa < 6; aa++)
        {
            solution[aa] = chart[pos1][(pos2 + aa) % 6];
            output       = output + "" + positions[solution[aa]] + " ";
        }
        Debug.LogFormat("[Colored Hexabuttons #{0}] Solution: {1}", moduleId, output);
        numButtonPresses = 0;
    }

    void pressedRed(int n)
    {
        if (!(moduleSolved))
        {
            Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
            Debug.LogFormat("[Colored Hexabuttons #{0}] User pressed {1}", moduleId, positions[n]);
            if (solution[numButtonPresses] == n)
            {
                Vector3 pos = buttonMesh[n].transform.localPosition;
                pos.y = 0.0126f;
                buttonMesh[n].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                hexButtons[n].OnInteract = null;
                ledMesh[n].material      = ledColors[1];
                if (numButtonPresses == 5)
                {
                    moduleSolved = true;
                    coloredHexabuttons.Solve();
                }
                else
                {
                    numButtonPresses++;
                }
            }
            else
            {
                numButtonPresses = 0;
                Debug.LogFormat("[Colored Hexabuttons #{0}] Strike! I was expecting {1}!", moduleId, positions[solution[numButtonPresses]]);
                coloredHexabuttons.Strike();
                for (int aa = 0; aa < 6; aa++)
                {
                    Vector3 pos = buttonMesh[aa].transform.localPosition;
                    pos.y = 0.0169f;
                    buttonMesh[aa].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
                    ledMesh[aa].material = ledColors[0];
                }
                foreach (int i in buttonIndex)
                {
                    hexButtons[i].OnInteract = delegate { pressedRed(buttonIndex[i]); return(false); }
                }
                ;
            }
        }
    }

    void pressedRedCenter()
    {
        if (!(moduleSolved))
        {
            Audio.PlayGameSoundAtTransform(KMSoundOverride.SoundEffect.ButtonPress, transform);
            Vector3 pos = buttonMesh[6].transform.localPosition;
            pos.y = 0.0126f;
            buttonMesh[6].transform.localPosition = new Vector3(pos.x, pos.y, pos.z);
            coloredHexabuttons.StartCoroutine(playAudio());
        }
    }

    IEnumerator playAudio()
    {
        hexButtons[6].OnInteract = null;
        yield return(new WaitForSeconds(0.5f));

        for (int aa = 0; aa < voiceMessage.Length; aa++)
        {
            Audio.PlaySoundAtTransform(voiceMessage[aa], transform);
            yield return(new WaitForSeconds(1.5f));
        }
        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);
        hexButtons[6].OnInteract = delegate { pressedRedCenter(); return(false); };
    }
}