// Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.LeftArrow))
        {
            cardSelectedIndex--;
            cardSelectedIndex = Mathf.Clamp(cardSelectedIndex, 0, cards.Count);
            SelectCard(cardSelectedIndex);
            ScorchAudio.PlayMenuMove();
        }

        if (Input.GetKeyDown(KeyCode.RightArrow))
        {
            cardSelectedIndex++;
            cardSelectedIndex = Mathf.Clamp(cardSelectedIndex, 0, cards.Count);
            SelectCard(cardSelectedIndex);
            ScorchAudio.PlayMenuMove();
        }

        if (Input.GetKeyDown(KeyCode.Return))
        {
            CardSelected.Dispatch(cards[cardSelectedIndex].cardData);
            ScorchAudio.PlayMenuSelect();
        }
    }
示例#2
0
 public void MenuSelect()
 {
     ScorchAudio.PlayMenuSelect();
 }