示例#1
0
    public void ChangeKey(GameObject button)
    {
        if (!IsListeningForKey)
        {
            sfxManager.SpawnUI_4_shake();
            IsListeningForKey = true;

            //Cache references
            currentButton          = button;
            currentText            = button.GetComponentInChildren <Text>();
            currentImage           = button.GetComponent <Image>();
            previousStringOnButton = currentText.text;

            //Visual indication that we're listening for a key input
            currentImage.color = ButtonColor_Modifying;
            currentText.text   = "???";
            TextColor_Default  = currentText.color;
            currentText.color  = Color.white;

            //Begin listening for an input
            StartCoroutine(ListenForKeyInput());
        }

        //resetter.CloseConfirmMenu();
    }