Beispiel #1
0
 public static void LoadPlanetConfig()
 {
     SortedList<int,PlanetData> List = new SortedList<int, PlanetData>();
     string[] loadText = LoadFile ("Config/Planet.csv");
     for(int i=1;i<loadText.Length;i++)
     {
         var PlanetData = new PlanetData();
         string[] Config = loadText[i].Split(',');
         if(Config.Length > 6)
         {
             PlanetData.Name = Config[1];
             PlanetData.BgName = Config[2];
             PlanetData.Shipyard = int.Parse(Config[3]);
             PlanetData.Government = int.Parse(Config[4]);
             PlanetData.Market = int.Parse(Config[5]);
             PlanetData.Bar = int.Parse(Config[6]);
             List.Add(int.Parse(Config[0]),PlanetData);
         }
     }
     PlanetDatas = List;
     DebugScene.Instance.WriteLine("星球列表讀取成功:共" + List.Count + "个");
 }
Beispiel #2
0
 public override void SetUp(int StartID)
 {
     ID = StartID;
     Data = GameData.PlanetDatas[StartID];
     DebugScene.Instance.WriteLine("讀取星球場景配置:ID" + StartID);
     //添加背景精灵
     AddBackground(Data.BgName);
     EventSelect(EventType.Planet);
 }