- 7 名前:名前は開発中のものです。 [2016/01/12(火) 10:37:02.27 ID:7+Ji+X3F.net]
- public void Save
{ Map mapdata = GameObject.Find("MAP").Getcomponent<Map>(); StreamWriter sw; FileInfo fi; fi = new FileInfo(Application.datapath + "/Resources/stageData.txt"); sw = fi.CreateText() for(int i=0;i<mapdata.maxY;i++){ for(int j=0;j<mapdata.maxX;j++){ sw.Write(mapdata.pos.y); sw.Write(","); sw.WriteLine(mapdata.pos.x); } } sw.Flush(); sw.Close(); } ソースコードはこの様な感じです Mapのデータを書き込むようにして 保存先はリソースファイルに指定しています
|

|