//Button_New
 protected void SizeButtonClicked(GameObject g)
 {
     //サイズ設定
     ToolBox.ShipSize s = gm.GetShipSize(g.name);
     if (s == null)
     {
         s = gm.shipSizeList[0];
     }
     gm.SetEditShipData(null);
     gm.editShipSize = s;
     gm.LoadLevel("ShipEditor");
 }
Exemplo n.º 2
0
 /// <summary>
 /// サイズ名を指定して機体サイズ情報を取得
 /// </summary>
 public ToolBox.ShipSize GetShipSize(string sizeName)
 {
     ToolBox.ShipSize size = null;
     foreach (ToolBox.ShipSize s in shipSizeList)
     {
         if (sizeName.Equals(s.name))
         {
             size = s;
             break;
         }
     }
     return(size);
 }
Exemplo n.º 3
0
 public string rankingFilePath;      //ランキングファイル
 #region MonoBehaviourイベント
 protected override void Awake()
 {
     base.Awake();
     //初期設定
     DontDestroyOnLoad(gameObject);
     //初期化
     bulletDic   = new Dictionary <string, Dictionary <string, ToolBox.Bullet> >();
     shipDataDic = new Dictionary <string, Dictionary <string, ToolBox.ShipData> >();
     //管理クラス生成
     fade  = (Instantiate(Resources.Load(fadeManagerPath)) as GameObject).GetComponent <FadeManager>();
     audio = (Instantiate(Resources.Load(audioManagerPath)) as GameObject).GetComponent <AudioManager>();
     //シーン管理
     sceneStack = new Stack <string>();
     //弾情報
     bulletFilePath = "/Bullet/Bullet.txt";
     bulletFilePath = Application.streamingAssetsPath + bulletFilePath;
     bulletDic      = ReadBullet(FuncBox.GetTextReader(bulletFilePath));
     //ステージ情報
     stageFolderPath = "/Stage";
     stageFolderPath = Application.streamingAssetsPath + stageFolderPath;
     stageDic        = ReadStageDic(stageFolderPath);
     //機体情報
     shipFolderPath = "/Ship";
     shipFolderPath = Application.streamingAssetsPath + shipFolderPath;
     shipDataDic    = ReadShipDic(shipFolderPath);
     //コンフィグ
     configFilePath = "/Config.txt";
     configFilePath = Application.streamingAssetsPath + configFilePath;
     ReadConfig(configFilePath);
     //ランキング
     rankingFilePath = "/Ranking.txt";
     rankingFilePath = Application.streamingAssetsPath + rankingFilePath;
     ReadRankingRecords(rankingFilePath);
     //エフェクト
     effectDic = ReadResourcesDic(effectPrefabPaths);
     //デフォルト編集機体サイズ
     editShipSize = shipSizeList[0];
     //プレイヤー選択機体
     playerSelectShips = new ToolBox.ShipData[4];
     for (int i = 0; i < playerSelectShips.Length; i++)
     {
         playerSelectShips[i] = null;
     }
 }