示例#1
0
    IEnumerator VillagerPhase()
    {
        VillageTile currentTile = gameBoard.getCurrentTile(this);

        string[]             options = new string[] { "Request help from " + currentTile.tilename, "Attempt Exorcism", "Pass" };
        string[]             buttons = new string[] { "A", "X", "B" };
        GSCoroutine <string> mcq     = io.getButtonPressDialog("What would you like to do?", options, buttons);

        yield return(mcq.coroutine);

        GS.displayInfoMessage(mcq.result);
        switch (mcq.result)
        {
        case "A":
            GS.displayInfoMessage(currentTile.tilename + " is busy, try again later.");
            break;

        case "X":
            yield return(StartCoroutine(gameBoard.attemptExorcism(this)));

            break;

        case "B":
            GS.displayInfoMessage("Passing turn");
            break;
        }
        yield return(new WaitForSeconds(1f));
    }