예제 #1
0
    //Coroutine for getting the text of the buttons pressed, and then display the name of the move used.
    IEnumerator PlayerAttackText()
    {
        string moveName = EventSystem.current.currentSelectedGameObject.GetComponentInChildren <Text>().text;
        int    damage   = playerPokemon.DamageDone(enemyPokemon);

        dialogText.text = playerPokemon.name + " Used " + moveName + " For " + damage + " DMG";

        yield return(new WaitForSeconds(2f));
    }