コード例 #1
0
    //handle option menu
    //public void OnClickChangeDifficulty(MazeDifficulty difficulty)//MazeDifficulty没提供序列化
    public void OnClickChangeDifficulty(int difficultyInt)
    {
        MazeDifficulty difficulty = (MazeDifficulty)difficultyInt;

        if (difficulty != GameData.instance.mazeDifficulty)
        {
            GameData.instance.mazeDifficulty = difficulty;
            ShowDifficulty(difficulty);
        }
    }
コード例 #2
0
 void ShowDifficulty(MazeDifficulty difficulty)
 {
     if (difficulty == MazeDifficulty.EASY)
     {
         easyTex.fontSize  = 80;
         easyTex.fontStyle = FontStyle.Bold;
         hardTex.fontSize  = 50;
         hardTex.fontStyle = FontStyle.Italic;
     }
     else
     {
         hardTex.fontSize  = 80;
         hardTex.fontStyle = FontStyle.Bold;
         easyTex.fontSize  = 50;
         easyTex.fontStyle = FontStyle.Italic;
     }
 }