0

我正在制作一个垂直进度条,如果玩家完成或完成游戏,颜色条将显示为绿色。如果他/她没有完成游戏,它将显示为红色。 例如 我如何在 xml 中制作它。?

enum(FOURPIX1LTR, FOURPIX1NBR, LTRMAZE, NBRMAZE);
image imgGameStatus = null; //
Loop through the games //

for (i = 0; i < numGames; i++) {

    switch (gameStatus[i]) {
    case "unfinished":

        imgGameStatus = imgGreyBox;

        break;

    case "gameover":
        imgGameStatus = imgRedBox;

        break;
    case "completed":
        imgGameStatus = imgGreenBox;

        break;
    }
}

// Take whatever imgGameStatus is and update indicator icon
ResultsPage.MazeIndicator.Image = imgGameStatus;
4

0 回答 0