Advertisement
cm3d2-01

CM3D2.AddYotogiSlider.Plugin.0.0.0.0

Aug 26th, 2015
4,451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 23.27 KB | None | 0 0
  1. // CM3D2.AddYotogiSlider.Plugin.0.0.0.0 : 夜伽時にメイドステータスをスライダーで操作する UnityInjector 用プラグイン
  2.  
  3. // 夜伽画面中にF5でUI表示トグル。 ( http://i.imgur.com/CohQ8Io.png )
  4. // 興奮・精神・理性をスライダーで調整、または固定する事が可能。
  5. // 瞳の上下位置をスライダーで調整可能。
  6. // 各ボタン押下で夜伽中のメイドにFaceBlend(頬・涙・よだれの組合せ)とFaceAnime(エロ○○系表情)を適用出来る。
  7. // ※注意
  8. // 夜伽ステータスのスライドバーは夜伽コマンド実行画面まではEnabledにしないで下さい。
  9. // 会話画面やスキル選択画面でEnabledにすると、ロード画面でフリーズします。
  10.  
  11. // 更新履歴
  12. // 0.0.0.0 初版 (AddModsSliderから分離)
  13. //         瞳上移動スライダーを追加
  14. //         UIがドラッグで移動できるように
  15.  
  16. using System;
  17. using System.Collections.Generic;
  18. using System.IO;
  19. using System.Reflection;
  20. using System.Text;
  21. using System.Text.RegularExpressions;
  22. using System.Xml;
  23. using UnityEngine;
  24. using UnityInjector.Attributes;
  25.  
  26. namespace CM3D2.AddYotogiSlider.Plugin
  27. {
  28.     [PluginFilter("CM3D2x64"),
  29.     PluginFilter("CM3D2x86"),
  30.     PluginFilter("CM3D2VRx64"),
  31.     PluginName("CM3D2 AddYotogiSlider"),
  32.     PluginVersion("0.0.0.0")]
  33.     public class AddYotogiSlider : UnityInjector.PluginBase
  34.     {
  35.         public const string Version = "0.0.0.0";
  36.  
  37.         private int sceneLevel;
  38.         private bool visible = false;
  39.         private PixelValues pv;
  40.  
  41.         private Maid maid;
  42.         private Rect winRect;
  43.         private Vector2 lastScreenSize;
  44.  
  45.         private float yotogiSliderWidth = 0.20f;
  46.         private float yotogiSliderHeight = 0.75f;
  47.         private string[] yotogiSliderLabel = {"興奮", "精神", "理性"};
  48.         private bool[] bToggleEnabled =  { false, false, false };
  49.         private bool[] bTogglePin = { false, false, false };
  50.         private bool bToggleYodare = false;
  51.         private float[] fYotogiValue = { 100f, 100f, 100f};
  52.         //private bool bTogglePupil = false;
  53.         private bool bLoadMaid = false;
  54.         private Vector3[] fPupilValueDef =  { new Vector3(0f, 0f, 0f), new Vector3(1f, 1f, 1f) };
  55.         private float[] fPupilValue = { 0f, 1f };
  56.         private string[] pupilSliderLabel = {"上ずらし", "大きさ"};
  57.         private int[] iFaceBlend = { 0, 0 };
  58.         private string[][] sFaceBlend = new string[2][];
  59.         private string[] sEroFaceAnime =  {"-----","通常1","通常2","通常3"
  60.                                           ,"興奮0","興奮1","興奮2","興奮3"
  61.                                           ,"メソ泣き","羞恥1","羞恥2","羞恥3"
  62.                                           ,"嫌悪1","好感1","好感2","好感3"
  63.                                           ,"怯え","期待","絶頂","放心"
  64.                                           ,"我慢1","我慢2","我慢3","舌責"
  65.                                           ,"痛み1","痛み2","痛み3","舌責快楽"
  66.                                           ,"痛み我慢2","痛み我慢3","舐め通常","舐め嫌悪"
  67.                                           ,"フェラ愛情","フェラ快楽","フェラ嫌悪","フェラ通常"
  68.                                           ,"舐め愛情","舐め愛情2","舐め快楽","舐め快楽2"
  69.                                           };
  70.         private YotogiParamBasicBar yotogiParamBasicBar;
  71.         delegate void SetValue(int val);
  72.         delegate void SetValueBool(int val, bool f);
  73.        
  74.  
  75.          private class PixelValues
  76.         {
  77.             public float BaseWidth = 1280f;
  78.             public float PropRatio = 0.6f;
  79.             public int Margin;
  80.  
  81.             private Dictionary<string, int> font = new Dictionary<string, int>();
  82.             private Dictionary<string, int> line = new Dictionary<string, int>();
  83.             private Dictionary<string, int> sys =  new Dictionary<string, int>();
  84.  
  85.             public PixelValues()
  86.             {
  87.                 Margin = PropPx(10);
  88.  
  89.                 font["C1"] = 11;
  90.                  font["C2"] = 12;
  91.                 font["H1"] = 14;
  92.                 font["H2"] = 16;
  93.                 font["H3"] = 20;
  94.  
  95.                 line["C1"] = 14;
  96.                 line["C2"] = 18;
  97.                 line["H1"] = 22;
  98.                 line["H2"] = 24;
  99.                 line["H3"] = 30;
  100.  
  101.                 sys["Menu.Height"] = 45;
  102.                 sys["OkButton.Height"] = 95;
  103.  
  104.                 sys["HScrollBar.Width"] = 15;
  105.             }
  106.            
  107.             public int Font(string key) { return PropPx(font[key]); }
  108.             public int Line(string key) { return PropPx(line[key]); }
  109.             public int Sys(string key)  { return PropPx(sys[key]); }
  110.  
  111.             public int Font_(string key) { return font[key]; }
  112.             public int Line_(string key) { return line[key]; }
  113.             public int Sys_(string key)  { return sys[key]; }
  114.  
  115.             public Rect PropScreen(float left, float top, float width, float height)
  116.             {
  117.                 return new Rect((int)((Screen.width - Margin * 2) * left + Margin)
  118.                                ,(int)((Screen.height - Margin * 2) * top + Margin)
  119.                                ,(int)((Screen.width - Margin * 2) * width)
  120.                                ,(int)((Screen.height - Margin * 2) * height));
  121.             }
  122.  
  123.             public Rect PropScreenMH(float left, float top, float width, float height)
  124.             {
  125.                 Rect r = PropScreen(left, top, width, height);
  126.                 r.y += Sys("Menu.Height");
  127.                 r.height -= (Sys("Menu.Height") + Sys("OkButton.Height"));
  128.                
  129.                 return r;
  130.             }
  131.  
  132.             public Rect PropScreenMH(float left, float top, float width, float height, Vector2 last)
  133.             {
  134.                 Rect r = PropScreen((float)(left/(last.x - Margin * 2)), (float)(top/(last.y - Margin * 2)), width, height);
  135.                 r.height -= (Sys("Menu.Height") + Sys("OkButton.Height"));
  136.                
  137.                 return r;
  138.             }
  139.  
  140.             public Rect InsideRect(Rect rect)
  141.             {
  142.                 return new Rect(Margin, Margin, rect.width - Margin * 2, rect.height - Margin * 2);
  143.             }
  144.  
  145.             public Rect InsideRect(Rect rect, int height)
  146.             {
  147.                 return new Rect(Margin, Margin, rect.width - Margin * 2, height);
  148.             }
  149.  
  150.             public int PropPx(int px)
  151.             {
  152.                 return (int)(px * (1f + (Screen.width/BaseWidth - 1f) * PropRatio));
  153.             }
  154.         }
  155.  
  156.  
  157.     //--------
  158.  
  159.         public void Awake()
  160.        {
  161.             pv = new PixelValues();
  162.             lastScreenSize = new Vector2(Screen.width, Screen.height);
  163.             sFaceBlend[0] = new string[] {"頬0", "頬1", "頬2", "頬3"};
  164.             sFaceBlend[1] = new string[] {"涙0", "涙1", "涙2", "涙3"};
  165.        }
  166.  
  167.         public void OnLevelWasLoaded(int level)
  168.         {
  169.             sceneLevel = level;
  170.  
  171.             if (sceneLevel == 9)
  172.             {
  173.  
  174.             }
  175.             else if (sceneLevel == 14)
  176.             {
  177.                 for(int i=0; i<bToggleEnabled.Length; i++) bToggleEnabled[i] = false;
  178.                 for(int i=0; i<bTogglePin.Length; i++)     bTogglePin[i]     = false;
  179.                 bToggleYodare = false;
  180.  
  181.                 winRect = pv.PropScreenMH(1f - yotogiSliderWidth, 1f - yotogiSliderHeight, yotogiSliderWidth-0.02f, yotogiSliderHeight);
  182.             }
  183.             else visible = false;
  184.         }
  185.  
  186.         void Update()
  187.         {
  188.             if (sceneLevel == 9)
  189.             {
  190.  
  191.             }
  192.             else if (sceneLevel == 14)
  193.             {
  194.                 if (Input.GetKeyDown(KeyCode.F5)) visible = !visible;
  195.  
  196.                 if (!yotogiParamBasicBar)
  197.                 {
  198.                     yotogiParamBasicBar = getYotogiParamBasicBar();
  199.                 }
  200.             }
  201.             else
  202.             {
  203.                 if(visible) visible = false;
  204.             }
  205.         }
  206.        
  207.         public void OnGUI()
  208.         {
  209.             if (!visible) return;
  210.  
  211.             GUIStyle winStyle = "box";
  212.             winStyle.fontSize = pv.Font("C1");
  213.             winStyle.alignment = TextAnchor.UpperRight;
  214.  
  215.             if (sceneLevel == 9)
  216.             {
  217.  
  218.             }
  219.             else if (sceneLevel == 14 && yotogiParamBasicBar)
  220.             {
  221.                 maid =  GameMain.Instance.CharacterMgr.GetMaid(0);
  222.                 if (maid == null) return;
  223.            
  224.                 if (maid.body0.trsEyeL.localPosition != null && (!bLoadMaid))
  225.                 {
  226.                     fPupilValueDef[0] = maid.body0.trsEyeL.localPosition;
  227.                     fPupilValueDef[1] = maid.body0.trsEyeL.localScale;
  228.                     bLoadMaid = true;
  229.                 }
  230.  
  231.                 if (lastScreenSize != new Vector2(Screen.width, Screen.height))
  232.                 {
  233.                     winRect = pv.PropScreenMH(winRect.x, winRect.y, yotogiSliderWidth, yotogiSliderHeight, lastScreenSize);
  234.                     lastScreenSize = new Vector2(Screen.width, Screen.height);
  235.                 }
  236.  
  237.                 winRect.height = pv.Font("H1") + pv.Line("C2") * (10 + Mathf.CeilToInt(sEroFaceAnime.Length / 4f)) + pv.Margin * 6;
  238.                 winRect = GUI.Window(1, winRect, addYotogiSlider, AddYotogiSlider.Version, winStyle);
  239.             }
  240.          }
  241.  
  242.     //--------
  243.  
  244.         private void addYotogiSlider(int winID)
  245.         {
  246.             Rect baseRect = pv.InsideRect(winRect);
  247.             Rect headerRect = new Rect(baseRect.x, baseRect.y, baseRect.width, pv.Line("H1"));
  248.             Rect conRect = new Rect(baseRect.x, baseRect.y + headerRect.height + pv.Margin
  249.                                    ,baseRect.width, baseRect.height - headerRect.height - pv.Margin);
  250.             GUIStyle lStyle = "label";
  251.             GUIStyle tStyle = "toggle";
  252.             GUIStyle btnStyle = "button";
  253.             SetValue svFunc;
  254.             SetValueBool svbFunc;
  255.  
  256.             tStyle.fontSize = pv.Font("C2");
  257.             tStyle.alignment = TextAnchor.MiddleLeft;
  258.  
  259.             lStyle.fontSize = pv.Font("H1");
  260.             lStyle.alignment = TextAnchor.UpperLeft;
  261.             drawWinHeader(headerRect, "Yotogi Slider", lStyle);
  262.  
  263.             GUI.BeginGroup(conRect);
  264.             {
  265.                 Rect outRect = new Rect(0, 0, conRect.width, 0);
  266.                
  267.                 // 夜伽スライダー
  268.                 outRect.height =  pv.Line("C2") * 4;
  269.                 GUI.BeginGroup(outRect);
  270.                 {
  271.                     int min, max;
  272.                     int lineWidth = (int)outRect.width;
  273.                     Rect outRectC = new Rect(0, 0, 0, pv.Line("C2"));
  274.  
  275.                     //----
  276.                     outRectC.width = lineWidth * 0.35f;
  277.                     lStyle.fontSize = pv.Font("C2");
  278.                     GUI.Label(outRectC, "Status : ", lStyle);
  279.                     outRectC.x += outRectC.width;
  280.  
  281.                     outRectC.width = lineWidth * 0.35f;
  282.                     tStyle.normal.textColor = bToggleEnabled[0] ? Color.white : Color.red;
  283.                     tStyle.hover.textColor  = bToggleEnabled[0] ? Color.white : Color.red;
  284.                     bToggleEnabled[0] = GUI.Toggle(outRectC, bToggleEnabled[0], bToggleEnabled[0] ? "Enabled" : "Disabled", tStyle);
  285.                     outRectC.x = lineWidth * 0.85f;
  286.  
  287.                     outRectC.width = lineWidth * 0.15f;
  288.                     lStyle.alignment = TextAnchor.LowerRight;
  289.                     GUI.Label(outRectC, "固定", lStyle);
  290.  
  291.                     outRectC.x = 0;
  292.                     outRectC.y += outRectC.height;
  293.                     //----
  294.                    
  295.                     lStyle.alignment = TextAnchor.LowerLeft;
  296.                     for (int i=0; i<3; i++)
  297.                     {    
  298.                         switch(i)
  299.                         {
  300.                             case 0:
  301.                                 min = -100;
  302.                                 max = 300;
  303.                                 svFunc = maid.Param.SetCurExcite;
  304.                                 svbFunc = yotogiParamBasicBar.SetCurrentExcite;
  305.                                 if(!bTogglePin[i]) fYotogiValue[i] = maid.Param.status.cur_excite;
  306.                                 break;
  307.                             case 1:
  308.                                 min = 0;
  309.                                 max = maid.Param.status.mind + maid.Param.status.maid_class_bonus_status.mind;
  310.                                 svFunc = maid.Param.SetCurMind;
  311.                                 svbFunc = yotogiParamBasicBar.SetCurrentMind;
  312.                                 if(!bTogglePin[i]) fYotogiValue[i] = maid.Param.status.cur_mind;
  313.                                 break;
  314.                             case 2:
  315.                                 min = 0;
  316.                                 max = maid.Param.status.reason;
  317.                                 svFunc = maid.Param.SetCurReason;
  318.                                 svbFunc = yotogiParamBasicBar.SetCurrentReason;
  319.                                 if(!bTogglePin[i]) fYotogiValue[i] = maid.Param.status.cur_reason;
  320.                                 break;
  321.                             default:
  322.                                 min = 0;
  323.                                 max = 0;
  324.                                 svFunc = null;
  325.                                 svbFunc = null;
  326.                                 break;
  327.                         }
  328.  
  329.                         outRectC.width = lineWidth * 0.3f;
  330.                         GUI.Label(outRectC, yotogiSliderLabel[i] +" : "+ fYotogiValue[i], lStyle);
  331.                         outRectC.x += outRectC.width;
  332.  
  333.                         outRectC.width = lineWidth * 0.6f;
  334.                          fYotogiValue[i] = GUI.HorizontalSlider(outRectC, fYotogiValue[i], min, max);
  335.                         outRectC.x += outRectC.width;
  336.  
  337.                         outRectC.y -= pv.PropPx(5);
  338.                         outRectC.width = lineWidth * 0.1f;
  339.                          bTogglePin[i] = GUI.Toggle(outRectC, bTogglePin[i], "");
  340.                         outRectC.y += pv.PropPx(5);
  341.                        
  342.                         if(bToggleEnabled[0])
  343.                         {
  344.                             if(svFunc != null) svFunc((int)fYotogiValue[i]);
  345.                             if(svbFunc != null) svbFunc((int)fYotogiValue[i], true);
  346.                         }
  347.  
  348.                         outRectC.x = 0;
  349.                         outRectC.y += outRectC.height;
  350.                     }
  351.                 }
  352.                 GUI.EndGroup();
  353.                 outRect.x = 0;
  354.                 outRect.y += outRect.height + pv.Margin;
  355.  
  356.  
  357.                 // 瞳 テスト
  358.                 outRect.height =  pv.Line("C2") * 1;
  359.                 GUI.BeginGroup(outRect);
  360.                 {
  361.                     float min, max;
  362.                     int lineWidth = (int)outRect.width;
  363.                     Rect outRectC = new Rect(0, 0, 0, pv.Line("C2"));
  364.  
  365.                     /*//----
  366.                     outRectC.width = lineWidth * 0.35f;
  367.                     lStyle.fontSize = pv.Font("C2");
  368.                     GUI.Label(outRectC, "瞳 : ", lStyle);
  369.                     outRectC.x += outRectC.width;
  370.  
  371.                     outRectC.width = lineWidth * 0.35f;
  372.                     tStyle.normal.textColor = bTogglePupil ? Color.white : Color.red;
  373.                     tStyle.hover.textColor  = bTogglePupil ? Color.white : Color.red;
  374.                     bTogglePupil = GUI.Toggle(outRectC, bTogglePupil, bTogglePupil ? "Enabled" : "Disabled", tStyle);
  375.  
  376.                     outRectC.x = 0;
  377.                     outRectC.y += outRectC.height;
  378.                     //----*/
  379.  
  380.                     for (int i=0; i<1; i++)
  381.                     {
  382.                         switch(i)
  383.                         {
  384.                             case 0:
  385.                                 min = 0f;
  386.                                 max = 1f;
  387.                                 break;
  388.                             case 1:
  389.                                 min = 0.1f;
  390.                                 max = 1.0f;
  391.                                 break;
  392.                             default:
  393.                                 min = 0;
  394.                                 max = 0;
  395.                                 break;
  396.                         }
  397.                        
  398.                        
  399.                         outRectC.width = lineWidth * 0.3f;
  400.                         GUI.Label(outRectC, "瞳↑ : "+ (fPupilValue[i]*100f).ToString("F0"), lStyle);
  401.                         outRectC.x += outRectC.width;
  402.  
  403.                         outRectC.width = lineWidth * 0.6f;
  404.                          fPupilValue[i] = GUI.HorizontalSlider(outRectC, fPupilValue[i], min, max);
  405.                         outRectC.x += outRectC.width;
  406.  
  407.                         outRectC.x = 0;
  408.                         outRectC.y += outRectC.height;
  409.                     }
  410.  
  411.                     //if(bTogglePupil)
  412.                     //{
  413.                         maid.body0.trsEyeL.localPosition = fPupilValueDef[0] + new Vector3(0f, fPupilValue[0]/50f, 0f);
  414.                         maid.body0.trsEyeR.localPosition = fPupilValueDef[0] - new Vector3(0f, fPupilValue[0]/50f, 0f);
  415.                         //maid.body0.trsEyeL.localScale = Vector3.Scale(fPupilValueDef[1], new Vector3(1f, fPupilValue[1], fPupilValue[1]));
  416.                         //maid.body0.trsEyeR.localScale = Vector3.Scale(fPupilValueDef[1], new Vector3(1f, fPupilValue[1], fPupilValue[1]));
  417.                     /*}
  418.                     else
  419.                     {
  420.                         maid.body0.trsEyeL.localPosition = fPupilValueDef[0];
  421.                         maid.body0.trsEyeR.localPosition = fPupilValueDef[0];
  422.                         //maid.body0.trsEyeL.localScale = fPupilValueDef[1];
  423.                         //maid.body0.trsEyeR.localScale = fPupilValueDef[1];
  424.                         bLoadMaid = false;
  425.                     }*/
  426.                 }
  427.                 GUI.EndGroup();
  428.                 outRect.x = 0;
  429.                 outRect.y += outRect.height + pv.Margin;
  430.  
  431.  
  432.                 // FaceBlend
  433.                 outRect.height =  pv.Line("C2") * 3;
  434.                 GUI.BeginGroup(outRect);
  435.                 {
  436.                     string tmp = "";
  437.                     int lineWidth = (int)outRect.width;
  438.                     Rect outRectC = new Rect(0, 0, 0, pv.Line("C2"));
  439.  
  440.                     //----
  441.                     outRectC.width = lineWidth * 0.35f;
  442.                     GUI.Label(outRectC, "FaceBlend :", lStyle);
  443.                     outRectC.x += outRectC.width;
  444.  
  445.                     outRectC.width = lineWidth * 0.35f;
  446.                     tStyle.fontSize = pv.Font("C2");
  447.                     tStyle.alignment = TextAnchor.MiddleLeft;
  448.                     tStyle.normal.textColor = (bToggleEnabled[1]) ? Color.white : Color.red;
  449.                     tStyle.hover.textColor  = (bToggleEnabled[1]) ? Color.white : Color.red;
  450.                     bToggleEnabled[1] = GUI.Toggle(outRectC, bToggleEnabled[1], (bToggleEnabled[1]) ? "Enabled" : "Disabled", tStyle);
  451.                     outRectC.x += outRectC.width;
  452.  
  453.                     outRectC.width = lineWidth * 0.30f;
  454.                     tStyle.fontSize = pv.Font("C2");
  455.                     tStyle.alignment = TextAnchor.MiddleLeft;
  456.                     tStyle.normal.textColor = (bToggleYodare) ? Color.white : Color.white;
  457.                     tStyle.hover.textColor  = (bToggleYodare) ? Color.white : Color.white;
  458.                     bToggleYodare = GUI.Toggle(outRectC, bToggleYodare, (bToggleYodare) ? "よだれ有" : "よだれ無", tStyle);
  459.  
  460.                     outRectC.x = 0;
  461.                     outRectC.y += outRectC.height;
  462.                     //----
  463.  
  464.                     outRectC.width = lineWidth;
  465.                     btnStyle.fontSize = pv.Font("C2");
  466.                     for(int i=0; i<iFaceBlend.Length; i++)
  467.                     {
  468.                         iFaceBlend[i] = GUI.SelectionGrid(outRectC, iFaceBlend[i], sFaceBlend[i], 4, btnStyle);
  469.                         tmp += sFaceBlend[i][iFaceBlend[i]];
  470.                         outRectC.y += outRectC.height;
  471.                     }
  472.  
  473.                     if(bToggleEnabled[1]) maid.FaceBlend((bToggleYodare) ? tmp + "よだれ" : tmp);
  474.                 }
  475.                 GUI.EndGroup();
  476.                 outRect.x = 0;
  477.                 outRect.y += outRect.height + pv.Margin;
  478.  
  479.  
  480.                 // FaceAnime
  481.                 outRect.height =  pv.Line("C2") * (2 + Mathf.CeilToInt(sEroFaceAnime.Length / 4f));
  482.                 GUI.BeginGroup(outRect);
  483.                 {
  484.                     int lineWidth = (int)outRect.width;
  485.                     Rect outRectC = new Rect(0, 0, 0, pv.Line("C2"));
  486.  
  487.                     //----
  488.                     outRectC.width = lineWidth * 0.35f;
  489.                     tStyle.normal.textColor = Color.white;
  490.                     GUI.Label(outRectC, "FaceAnime :", lStyle);
  491.                     outRectC.x += outRectC.width;
  492.                     /*
  493.                     outRectC.width = lineWidth * 0.65f;
  494.                     tStyle.fontSize = pv.Font("C2");;
  495.                     tStyle.alignment = TextAnchor.MiddleLeft;
  496.                     tStyle.normal.textColor = (bToggleEnabled[2]) ? Color.white : Color.red;
  497.                     tStyle.hover.textColor  = (bToggleEnabled[2]) ? Color.white : Color.red;
  498.                     bToggleEnabled[2] = GUI.Toggle(outRectC, bToggleEnabled[2], (bToggleEnabled[2]) ? "LipSync STOP" : "LipSync On", tStyle);
  499.                     if(bToggleEnabled[2]) maid.StopKuchipakuPattern();
  500.                     */
  501.                     outRectC.x = 0;
  502.                     outRectC.y += outRectC.height;
  503.                     //----
  504.  
  505.                     outRectC.width = lineWidth * 0.25f;
  506.                     outRectC.y += drawEroFaceAnimeButton(outRectC, maid) * outRectC.height;
  507.                 }
  508.                 GUI.EndGroup();
  509.             }
  510.             GUI.EndGroup();
  511.             GUI.DragWindow();
  512.         }
  513.        
  514.  
  515.         private void drawWinHeader(Rect rect, string s, GUIStyle style)
  516.         {
  517.             GUI.Label(rect, s, style);
  518.             {
  519.                 ;
  520.             }
  521.         }
  522.  
  523.     //--------
  524.  
  525.         private int drawEroFaceAnimeButton(Rect rect, Maid maid)
  526.         {
  527.             int j = 0;
  528.             for(int i = 0; i<sEroFaceAnime.Length; i++)
  529.             {
  530.                 if(GUI.Button(rect, sEroFaceAnime[i]))
  531.                 {
  532.                     maid.FaceAnime("エロ" + sEroFaceAnime[i], 1f, 0);
  533.                 }
  534.  
  535.                 if((i + 1) % 4 == 0)
  536.                 {
  537.                     rect.x -= rect.width*3;
  538.                     rect.y += rect.height;
  539.                     if (j == 4 || j == 7) rect.y += pv.PropPx(5);
  540.                     j++;
  541.                 }
  542.                 else rect.x += rect.width;
  543.             }
  544.            
  545.             return j;
  546.         }
  547.  
  548.     //--------
  549.  
  550.         private YotogiParamBasicBar getYotogiParamBasicBar()
  551.         {
  552.             YotogiParamBasicBar ypbb = BaseMgr<YotogiParamBasicBar>.Instance;
  553.             if (ypbb == null) return null;
  554.  
  555.             return ypbb;
  556.         }
  557.  
  558.     }
  559.  
  560. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement