Unity3D里的集合:Array、Hashtable(因为对Unity里面可以用到的集合还有哪些不是很清楚,当前我就只知道Array、Hashtable)

var SinglePlayerInfo : Array = new Array();
SinglePlayerInfo.Add(“sam”); //name
SinglePlayerInfo.Add(“1”); //networkPlayer
SinglePlayerInfo.Add(“3”); // kill
SinglePlayerInfo.Add(“2”); //die

var AllPlayerInfo : Hashtable = new Hashtable();
AllPlayerInfo.Add(“sam”,SinglePlayerInfo);

for(var de : DictionaryEntry in AllPlayerInfo ){
SinglePlayerInfo = de.Value ;
//print(de.Key+”:”+de.Value);
SinglePlayerInfo = new Array(de.Value);
var username : String = SinglePlayerInfo[0];
var ntplayer : String = SinglePlayerInfo[1];
var kill : String = SinglePlayerInfo[2];
var die : String = SinglePlayerInfo[3];

//print(SinglePlayerInfo[0]+”:”+SinglePlayerInfo[1]+”:”+SinglePlayerInfo[2]+”:”+SinglePlayerInfo[3]+”;”);
}