コード例 #1
0
 void ExpInfo(Text t, CrewMemberData explorer)
 {
     StringBuilder expDisplay = new StringBuilder();
     expDisplay.Append(explorer.getName() + " Gained " + explorer.getXPGainedOnIsland() + " XP");
     if (explorer.getLevelsGainedOnIsland() >= 2) {
         expDisplay.Append(" \nand leveled up " + explorer.getLevelsGainedOnIsland() + " times!");
     } else if (explorer.getLevelsGainedOnIsland() == 1) {
         expDisplay.Append(" \nand leveled up once!!");
     }
     t.text = expDisplay.ToString();
     explorer.setXPGainedOnIsland(0);
     explorer.resetLevelsGainedOnIsland();
 }