Ejemplo n.º 1
0
 private void OnGUI()
 {
     //IL_0016: Unknown result type (might be due to invalid IL or missing references)
     GUILayout.BeginArea(new Rect(0f, 0f, (float)Screen.get_width(), (float)Screen.get_height()));
     GUILayout.BeginHorizontal((GUILayoutOption[])new GUILayoutOption[0]);
     GUILayout.FlexibleSpace();
     GUILayout.BeginVertical((GUILayoutOption[])new GUILayoutOption[0]);
     GUILayout.Label("item model display info editor", (GUILayoutOption[])new GUILayoutOption[0]);
     if (!Application.get_isPlaying())
     {
         GUILayout.Label("実行して下さい。", (GUILayoutOption[])new GUILayoutOption[0]);
     }
     else
     {
         GUILayout.Label("中心点の前後の調整は「Pivot」のZ移動。\nモデルの位置・姿勢の調整は「Model0」「Model1」を移動・回転。", (GUILayoutOption[])new GUILayoutOption[0]);
         if (!pivotAutoRotate)
         {
             if (GUILayout.Button("「Pivot」自動回転をON", (GUILayoutOption[])new GUILayoutOption[0]))
             {
                 pivotAutoRotate = true;
             }
         }
         else if (GUILayout.Button("「Pivot」自動回転をOFF", (GUILayoutOption[])new GUILayoutOption[0]))
         {
             pivotAutoRotate = false;
         }
         if (GUILayout.Button("PivotのY回転をリセット", (GUILayoutOption[])new GUILayoutOption[0]))
         {
             ForEachModels(delegate(Transform t)
             {
                 ResetPivotAngle(t);
             });
             pivotAutoRotate = false;
         }
         if (GUILayout.Button("エディット内容をGlobalSettingsManagerに反映", (GUILayoutOption[])new GUILayoutOption[0]) && globalSettingsManager != null)
         {
             GlobalSettingsManager.UIModelRenderingParam uiModelRendering = globalSettingsManager.uiModelRendering;
             GlobalSettingsManager.UIModelRenderingParam.DisplayInfo[] weaponDisplayInfos = globalSettingsManager.uiModelRendering.WeaponDisplayInfos;
             int i   = 0;
             int num = weaponDisplayInfos.Length;
             for (int num2 = weapons.Length; i < num && i < num2; i++)
             {
                 SaveSettings(weaponDisplayInfos[i], weapons[i]);
             }
             SaveSettings(uiModelRendering.armorDisplayInfo, armor);
             SaveSettings(uiModelRendering.helmDisplayInfo, helm);
             SaveSettings(uiModelRendering.armDisplayInfo, arm);
             SaveSettings(uiModelRendering.legDisplayInfo, leg);
             SaveSettings(uiModelRendering.itemDisplayInfo, item);
         }
     }
     GUILayout.EndVertical();
     GUILayout.FlexibleSpace();
     GUILayout.EndHorizontal();
     GUILayout.EndArea();
 }
Ejemplo n.º 2
0
 private void OnValidate()
 {
     if (!Application.get_isPlaying() && globalSettingsManager != null)
     {
         GlobalSettingsManager.UIModelRenderingParam uiModelRendering = globalSettingsManager.uiModelRendering;
         GlobalSettingsManager.UIModelRenderingParam.DisplayInfo[] weaponDisplayInfos = uiModelRendering.WeaponDisplayInfos;
         int i   = 0;
         int num = weaponDisplayInfos.Length;
         for (int num2 = weapons.Length; i < num && i < num2; i++)
         {
             LoadSettings(weaponDisplayInfos[i], weapons[i]);
         }
         LoadSettings(uiModelRendering.armorDisplayInfo, armor);
         LoadSettings(uiModelRendering.helmDisplayInfo, helm);
         LoadSettings(uiModelRendering.armDisplayInfo, arm);
         LoadSettings(uiModelRendering.legDisplayInfo, leg);
         LoadSettings(uiModelRendering.itemDisplayInfo, item);
     }
 }