//ステージ選択の端にいるか見る bool GetEnd() { if (num == 0) { if (SelectStage.Page == GetComponent <SelectStage>().GetMin()) //左端か見る { return(true); } else { return(false); } } else { if (SelectStage.Page == SelectStage.GetMax() - 1) //右端か見る { return(true); } else { return(false); } } }
void Start() { Camera = GameObject.Find("Main Camera"); if (SceneManager.GetActiveScene().name != "main") { return; } if (ChangeScene.OldScene == "StageSelect") //じっくり { for (int j = 0; j <= SelectStage.GetMax(); j++) { string num = (j).ToString();//10の位を文字列に変換 for (int i = 0; i < 10; i++) { if (stage == num + i) { CameraPosSet(j, i); spre = (GameObject)Resources.Load("stages/Stage" + num + i); break; } } } } else if (ChangeScene.OldScene == "LevelSelect") //ぱにっく { switch (level) { case "Level1": Camera.transform.position = new Vector3(25.0f, 49.0f, 5.0f); spre = (GameObject)Resources.Load("panics/Panic01"); break; default: break; } } if (spre != null) { Instantiate(spre);//Prefabの呼び出し } }
//タッチ時の行動 void TouchAction(string name) { if (name == "<Back") { fade.outFlag = true; nextName = "ModeSelect"; } for (int i = 0; i <= SelectStage.GetMax(); i++) { string num = (i).ToString(); for (int j = 0; j < 10; j++) { if (name == num + j) { fade.outFlag = true; ChangeScene.OldScene = "StageSelect"; nextName = "main"; } } } }