有没有办法在草图关闭并重新打开后在处理中创建记分板?有没有办法让这个工作在android?
答案 0 :(得分:1)
这里有一个使用saveStrings()的小样本:
//random scores
int[] scores = {01,20,40,60,30,25};
void setup(){
//convert and save
String[] s = str(scores);
saveStrings("sco.txt",s);
//load in a different array...
// the path to saved data,
String path = "/Users/vk/Documents/Processing/_forum/saveScore/sco.txt";
int[] loadedScores = int(loadStrings(path));
// ensure they are there...
println(loadedScores);
}