/// <summary> /// ウィンドウにGUIを配置 /// </summary> /// <param name="id"></param> private void PlayerGUI(int id) { int width = 130; scrollPos = EditorGUILayout.BeginScrollView(scrollPos, GUILayout.Height(windowRect.height)); //各パラメータを設定 for (int i = 0; i < names.Length; i++) { GUILayout.BeginHorizontal(); names[i] = EditorGUILayout.TextField(names[i], GUILayout.Width(width)); //if (i <= 2) //{ // parameters[i] = EditorGUILayout.IntField((int)parameters[i]); //} //else //{ parameters[i] = EditorGUILayout.FloatField(parameters[i]); //} GUILayout.EndHorizontal(); EditorGUILayout.Space(); } //パラメータを保存 GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); if (GUILayout.Button("設定")) { ExcelExport(); //SP取得量配列の設定 //SpRateSettings.ChangeMaxHp((int)parameters[1]); } GUILayout.EndHorizontal(); //ウィンドウを閉じる EditorGUILayout.BeginVertical(); GUILayout.FlexibleSpace(); if (GUILayout.Button("閉じる")) { menu = new ParameterMenu(); SceneView.onSceneGUIDelegate -= PlayerOnSceneGUI; } EditorGUILayout.EndVertical(); EditorGUILayout.EndScrollView(); }
/// <summary> /// ウィンドウにGUIを配置 /// </summary> /// <param name="id"></param> private void BossGUI(int id) { int width = 110; scrollPos = EditorGUILayout.BeginScrollView(scrollPos, GUILayout.Height(windowRect.height)); GUILayout.BeginHorizontal(); bossFile = EditorGUILayout.ObjectField(bossFile, typeof(Object), true); GUILayout.EndHorizontal(); EditorGUILayout.Space(); for (int i = 1; i <= bossCout; i++) { if (GUILayout.Button("ボス :" + i)) { } EditorGUILayout.Space(); } //GUILayout.BeginHorizontal(); //names[0] = EditorGUILayout.TextField(names[0], GUILayout.Width(width)); //parameters[0] = EditorGUILayout.FloatField(parameters[0]); //GUILayout.EndHorizontal(); //EditorGUILayout.Space(); //GUILayout.BeginHorizontal(); //names[1] = EditorGUILayout.TextField(names[1], GUILayout.Width(width)); //GUILayout.EndHorizontal(); //for (int i = 0; i < positions.Count; i++) //{ // GUILayout.BeginHorizontal(); // positions[i] = EditorGUILayout.Vector2Field(i + ":", positions[i]); // GUILayout.EndHorizontal(); // EditorGUILayout.Space(); //} //GUILayout.BeginHorizontal(); //if (GUILayout.Button("座標の設定を開く")) //{ // positionsSet = new PositionParameter(); // SceneView.onSceneGUIDelegate -= BossOnSceneGUI; //} //GUILayout.EndHorizontal(); //EditorGUILayout.Space(); ////各パラメータを設定 //for (int i = 0; i < names.Length; i++) //{ // if (i <= 1) continue; // GUILayout.BeginHorizontal(); // names[i] = EditorGUILayout.TextField(names[i], GUILayout.Width(width)); // if (i == 4) // { // parameters[i - 1] = EditorGUILayout.IntField((int)parameters[i - 1]); // } // else // { // parameters[i - 1] = EditorGUILayout.FloatField(parameters[i - 1]); // } // GUILayout.EndHorizontal(); // EditorGUILayout.Space(); //} ////パラメータを保存 //GUILayout.BeginHorizontal(); //GUILayout.FlexibleSpace(); //if (GUILayout.Button("設定")) //{ // ExcelExport(); //} //GUILayout.EndHorizontal(); //ウィンドウを閉じる EditorGUILayout.BeginVertical(); GUILayout.FlexibleSpace(); if (GUILayout.Button("閉じる")) { menu = new ParameterMenu(); SceneView.onSceneGUIDelegate -= BossOnSceneGUI; } EditorGUILayout.EndVertical(); EditorGUILayout.EndScrollView(); }
static ShowMenu() { menu = new ParameterMenu(); }