TouchAction_Mgr.cs 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using UnityEngine;
  6. using wf;
  7. public class TouchAction_Mgr : PartsMgrBase
  8. {
  9. public static TouchAction_Mgr Instance { get; private set; }
  10. protected override void Start()
  11. {
  12. TouchAction_Mgr.Instance = this;
  13. base.Start();
  14. int tmpGenericFlag = GameMain.Instance.CMSystem.GetTmpGenericFlag("ダンスOVRカメラタイプ");
  15. if (!base.IsActive || !GameMain.Instance.VRMode || tmpGenericFlag == 1)
  16. {
  17. base.IsActive = false;
  18. base.gameObject.SetActive(false);
  19. return;
  20. }
  21. base.transform.parent.gameObject.layer = base.gameObject.layer;
  22. if (RhythmAction_Mgr.NowDance == RhythmAction_Mgr.DanceType.Encore)
  23. {
  24. GameMain.Instance.MainCamera.SetPos(this.m_FirstCamPos);
  25. }
  26. OvrMgr.OvrObject.Controller left_controller = GameMain.Instance.OvrMgr.ovr_obj.left_controller;
  27. OvrMgr.OvrObject.Controller right_controller = GameMain.Instance.OvrMgr.ovr_obj.right_controller;
  28. if (left_controller != null)
  29. {
  30. this.m_ControllerInput.Add(left_controller.controller, left_controller.controller_buttons);
  31. }
  32. if (right_controller != null)
  33. {
  34. this.m_ControllerInput.Add(right_controller.controller, right_controller.controller_buttons);
  35. }
  36. this.m_TouchMgr = new VRTouchMgr();
  37. }
  38. private IEnumerator ActionCheck()
  39. {
  40. Dictionary<AVRControllerButtons, bool> input_exist = new Dictionary<AVRControllerButtons, bool>();
  41. foreach (AVRControllerButtons key in this.m_ControllerInput.Values)
  42. {
  43. input_exist.Add(key, false);
  44. }
  45. for (;;)
  46. {
  47. yield return null;
  48. if (!Product.VBA && !RhythmAction_Mgr.Instance.IsPause && RhythmAction_Mgr.Instance.DanceMaid.Count > 1)
  49. {
  50. Maid vibeTarget = this.m_VibeTarget;
  51. if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.RightArrow))
  52. {
  53. if (Input.GetKeyDown(KeyCode.LeftArrow) && this.m_MaidUIInfoSet[this.m_VibeTarget].PreviousUIInfo != null)
  54. {
  55. this.m_VibeTarget = this.m_MaidUIInfoSet[this.m_VibeTarget].PreviousUIInfo.TargetMaid;
  56. }
  57. else if (Input.GetKeyDown(KeyCode.RightArrow) && this.m_MaidUIInfoSet[this.m_VibeTarget].NextUIInfo != null)
  58. {
  59. this.m_VibeTarget = this.m_MaidUIInfoSet[this.m_VibeTarget].NextUIInfo.TargetMaid;
  60. }
  61. }
  62. else
  63. {
  64. foreach (KeyValuePair<AVRController, AVRControllerButtons> keyValuePair in this.m_ControllerInput)
  65. {
  66. AVRController key2 = keyValuePair.Key;
  67. if (key2.HandDanceMode)
  68. {
  69. AVRControllerButtons value = keyValuePair.Value;
  70. Vector2 axis = value.GetAxis();
  71. bool flag = Mathf.Abs(axis.x) > 0.25f;
  72. bool flag2 = false;
  73. AVRControllerButtons.TYPE type = value.Type;
  74. if (type != AVRControllerButtons.TYPE.TOUCH)
  75. {
  76. if (type == AVRControllerButtons.TYPE.VIVE)
  77. {
  78. if (flag && value.GetPressDown(AVRControllerButtons.BTN.STICK_PAD))
  79. {
  80. flag2 = true;
  81. }
  82. }
  83. }
  84. else if (!flag)
  85. {
  86. input_exist[value] = false;
  87. }
  88. else if (!input_exist[value])
  89. {
  90. input_exist[value] = true;
  91. flag2 = true;
  92. }
  93. if (flag2)
  94. {
  95. if (axis.x < 0f && this.m_MaidUIInfoSet[this.m_VibeTarget].PreviousUIInfo != null)
  96. {
  97. this.m_VibeTarget = this.m_MaidUIInfoSet[this.m_VibeTarget].PreviousUIInfo.TargetMaid;
  98. }
  99. else if (axis.x > 0f && this.m_MaidUIInfoSet[this.m_VibeTarget].NextUIInfo != null)
  100. {
  101. this.m_VibeTarget = this.m_MaidUIInfoSet[this.m_VibeTarget].NextUIInfo.TargetMaid;
  102. }
  103. }
  104. if (vibeTarget != this.m_VibeTarget)
  105. {
  106. break;
  107. }
  108. }
  109. }
  110. }
  111. if (vibeTarget != this.m_VibeTarget)
  112. {
  113. GameMain.Instance.SoundMgr.PlaySystem(SoundMgr.SeType.Hover);
  114. this.m_SelectFrame.localPosition = this.m_MaidUIInfoSet[this.m_VibeTarget].UIObj.transform.localPosition;
  115. }
  116. }
  117. foreach (Maid maid in RhythmAction_Mgr.Instance.DanceMaid)
  118. {
  119. if (!RhythmAction_Mgr.Instance.IsPause)
  120. {
  121. if (!Product.VBA)
  122. {
  123. if (maid == this.m_VibeTarget)
  124. {
  125. bool flag3 = this.m_ControllerInput.Any((KeyValuePair<AVRController, AVRControllerButtons> e) => e.Key.HandDanceMode && e.Value.GetPressDown(AVRControllerButtons.BTN.TRIGGER));
  126. if (Input.GetKeyDown(KeyCode.Space) || flag3)
  127. {
  128. this.m_ActionParam[maid].IsVibeOn = !this.m_ActionParam[maid].IsVibeOn;
  129. }
  130. }
  131. if (!this.m_ActionParam[maid].m_VibeObj)
  132. {
  133. this.m_ActionParam[maid].m_VibeObj = maid.body0.GetSlot(34).obj_tr;
  134. this.m_ActionParam[maid].VibeAudio.Init(AudioSourceMgr.Type.Se, true, GameMain.Instance.SoundMgr, this.m_ActionParam[maid].m_VibeObj);
  135. }
  136. if (GameMain.Instance.MainCamera.IsFadeOut())
  137. {
  138. this.m_ActionParam[maid].VibeAudio.audiosource.Pause();
  139. }
  140. }
  141. if (this.m_TouchMgr != null)
  142. {
  143. this.m_TouchMgr.FrameStart();
  144. }
  145. foreach (KeyValuePair<TouchActionParam.TouchType, TouchActionParam.ActionParam> keyValuePair2 in this.m_ActionParam[maid].TouchParam)
  146. {
  147. bool flag4 = false;
  148. if (keyValuePair2.Key == TouchActionParam.TouchType.セクハラ && !Product.VBA)
  149. {
  150. if (this.m_ActionParam[maid].IsVibeOn)
  151. {
  152. this.m_MaidUIInfoSet[maid].Icon.color = this.m_VibeOnColor;
  153. flag4 = true;
  154. if (!this.m_ActionParam[maid].VibeAudio.isPlay())
  155. {
  156. if (!this.m_ActionParam[maid].IsVibeFirst)
  157. {
  158. this.m_ActionParam[maid].VibeAudio.LoadPlay("SE020.ogg", 0f, false, true);
  159. }
  160. else
  161. {
  162. this.m_ActionParam[maid].VibeAudio.audiosource.UnPause();
  163. }
  164. this.m_ActionParam[maid].IsVibeFirst = true;
  165. }
  166. this.m_MaidUIInfoSet[maid].SexualEffect.gameObject.SetActive(true);
  167. }
  168. else
  169. {
  170. this.m_ActionParam[maid].VibeAudio.audiosource.Pause();
  171. this.m_MaidUIInfoSet[maid].SexualEffect.gameObject.SetActive(false);
  172. this.m_MaidUIInfoSet[maid].Icon.color = Color.white;
  173. }
  174. }
  175. for (int i = 0; i <= 1; i++)
  176. {
  177. if (flag4)
  178. {
  179. break;
  180. }
  181. foreach (VRTouchMgr.ETouchPos etouchPos in this.m_TouchPosList)
  182. {
  183. if (this.m_TouchMgr.GetBehaviorTouch((VRTouchMgr.EHand)i, etouchPos, VRTouchMgr.ETouchBehavior.触る, maid.ActiveSlotNo) && this.PosDealingType(keyValuePair2.Key, etouchPos))
  184. {
  185. flag4 = true;
  186. break;
  187. }
  188. }
  189. }
  190. keyValuePair2.Value.IsTouch = flag4;
  191. if (keyValuePair2.Value.IsTouch)
  192. {
  193. keyValuePair2.Value.TouchTimer += RhythmAction_Mgr.Instance.DanceDeltaTime;
  194. keyValuePair2.Value.NotTouchTimer = 0f;
  195. if (keyValuePair2.Value.TouchTimer >= 2f)
  196. {
  197. keyValuePair2.Value.TouchTimer = 0f;
  198. keyValuePair2.Value.Point++;
  199. }
  200. }
  201. else
  202. {
  203. keyValuePair2.Value.NotTouchTimer += RhythmAction_Mgr.Instance.DanceDeltaTime;
  204. if (keyValuePair2.Value.NotTouchTimer >= 3f)
  205. {
  206. keyValuePair2.Value.NotTouchTimer = 0f;
  207. keyValuePair2.Value.Point--;
  208. if (keyValuePair2.Value.Point < 0)
  209. {
  210. keyValuePair2.Value.Point = 0;
  211. }
  212. }
  213. }
  214. }
  215. if (this.m_TouchMgr != null)
  216. {
  217. this.m_TouchMgr.FrameEnd();
  218. }
  219. }
  220. else if (!Product.VBA)
  221. {
  222. this.m_ActionParam[maid].VibeAudio.audiosource.Pause();
  223. }
  224. TouchActionParam.TouchType type2 = TouchActionParam.TouchType.セクハラ;
  225. if (this.m_ActionParam[maid].TouchParam[TouchActionParam.TouchType.セクハラ].Point < this.m_ActionParam[maid].TouchParam[TouchActionParam.TouchType.お邪魔].Point)
  226. {
  227. type2 = TouchActionParam.TouchType.お邪魔;
  228. }
  229. this.PointFaceChenge(maid, type2, this.m_ActionParam[maid]);
  230. }
  231. }
  232. yield break;
  233. }
  234. private bool PosDealingType(TouchActionParam.TouchType type, VRTouchMgr.ETouchPos pos)
  235. {
  236. if (type == TouchActionParam.TouchType.セクハラ)
  237. {
  238. return this.m_SexualPos.Any((VRTouchMgr.ETouchPos e) => e == pos);
  239. }
  240. return this.m_SexualPos.All((VRTouchMgr.ETouchPos e) => e != pos);
  241. }
  242. private void PointFaceChenge(Maid maid, TouchActionParam.TouchType type, TouchActionParam param)
  243. {
  244. bool flag = type != this.m_ActionParam[maid].NowSetType;
  245. bool flag2 = this.m_ActionParam[maid].NowUseParam.Point == 0;
  246. if (flag || flag2)
  247. {
  248. this.m_ActionParam[maid].IsEventStart = false;
  249. if (flag || (!this.m_ActionParam[maid].MotionFaceBlendChange && flag2))
  250. {
  251. RhythmAction_Mgr.Instance.SetMaidFaceBlendStop(maid, false);
  252. }
  253. if (flag || (!this.m_ActionParam[maid].MotionFaceChange && flag2))
  254. {
  255. RhythmAction_Mgr.Instance.SetMaidFaceStop(maid, false);
  256. }
  257. this.m_ActionParam[maid].NowSetType = type;
  258. if (flag2)
  259. {
  260. return;
  261. }
  262. }
  263. TouchAction_Mgr.StateTable stateTable = this.m_EachStateTable.SingleOrDefault((TouchAction_Mgr.StateTable e) => e.Type == type);
  264. int point = this.GetBordarPoint(this.m_ActionParam[maid].NowUseParam, stateTable);
  265. TouchAction_Mgr.StateTable.ParamSet paramSet = stateTable.PointFacePair.SingleOrDefault((TouchAction_Mgr.StateTable.ParamSet e) => e.Point == point);
  266. RhythmAction_Mgr.Instance.SetMaidFaceBlendStop(maid, !string.IsNullOrEmpty(paramSet.FaceBlend));
  267. if (RhythmAction_Mgr.Instance.GetMaidFaceBlendStop(maid))
  268. {
  269. this.FaceBlendChange(maid, paramSet.FaceBlend);
  270. }
  271. if (!this.m_ActionParam[maid].IsEventStart)
  272. {
  273. this.m_ActionParam[maid].IsEventStart = true;
  274. base.StartCoroutine(this.FaceChangeEvent(this.m_ActionParam[maid], stateTable, maid));
  275. }
  276. }
  277. private void FaceBlendChange(Maid maid, string blend)
  278. {
  279. TMorph.AddBlendType addBlendType = TMorph.AddBlendType.None;
  280. if (blend.IndexOf("頬1") >= 0 || blend.IndexOf("頬1") >= 0)
  281. {
  282. addBlendType |= TMorph.AddBlendType.Cheek1;
  283. }
  284. if (blend.IndexOf("頬2") >= 0 || blend.IndexOf("頬2") >= 0)
  285. {
  286. addBlendType |= TMorph.AddBlendType.Cheek2;
  287. }
  288. if (blend.IndexOf("頬3") >= 0 || blend.IndexOf("頬3") >= 0)
  289. {
  290. addBlendType |= TMorph.AddBlendType.Cheek3;
  291. }
  292. if (blend.IndexOf("涙1") >= 0 || blend.IndexOf("涙1") >= 0)
  293. {
  294. addBlendType |= TMorph.AddBlendType.Tear1;
  295. }
  296. if (blend.IndexOf("涙2") >= 0 || blend.IndexOf("涙2") >= 0)
  297. {
  298. addBlendType |= TMorph.AddBlendType.Tear2;
  299. }
  300. if (blend.IndexOf("涙3") >= 0 || blend.IndexOf("涙3") >= 0)
  301. {
  302. addBlendType |= TMorph.AddBlendType.Tear3;
  303. }
  304. if (blend.IndexOf("赤面") >= 0)
  305. {
  306. addBlendType |= TMorph.AddBlendType.Blush;
  307. }
  308. if (blend.IndexOf("ショック") >= 0)
  309. {
  310. addBlendType |= TMorph.AddBlendType.Shock;
  311. }
  312. if (blend.IndexOf("玉涙") >= 0)
  313. {
  314. addBlendType |= TMorph.AddBlendType.TearBig;
  315. }
  316. maid.body0.Face.morph.SetValueOriginalBlendSet(addBlendType);
  317. maid.FaceBlend("オリジナル");
  318. }
  319. private IEnumerator FaceChangeEvent(TouchActionParam param, TouchAction_Mgr.StateTable table, Maid maid)
  320. {
  321. float timer = 0f;
  322. TouchActionParam.ActionParam touch_param = param.NowUseParam;
  323. int now_point = this.GetBordarPoint(touch_param, table);
  324. TouchAction_Mgr.StateTable.ParamSet table_param = table.PointFacePair.SingleOrDefault((TouchAction_Mgr.StateTable.ParamSet e) => e.Point == now_point);
  325. TouchActionParam.TouchType now_type = this.m_ActionParam[maid].NowSetType;
  326. if (now_type == TouchActionParam.TouchType.セクハラ)
  327. {
  328. this.m_MaidUIInfoSet[maid].SexualEffect.gameObject.SetActive(true);
  329. }
  330. for (;;)
  331. {
  332. if (!RhythmAction_Mgr.Instance.IsPause)
  333. {
  334. timer += RhythmAction_Mgr.Instance.DanceDeltaTime;
  335. }
  336. if (now_type != this.m_ActionParam[maid].NowSetType)
  337. {
  338. break;
  339. }
  340. string face = string.Empty;
  341. if (timer >= 5f)
  342. {
  343. timer = 0f;
  344. if (UnityEngine.Random.Range(0, 100) < table_param.Probability)
  345. {
  346. if (table_param.Face.Count<string>() > 0)
  347. {
  348. RhythmAction_Mgr.Instance.SetMaidFaceStop(maid, true);
  349. int num = 0;
  350. if (table_param.Face.Count<string>() > 1)
  351. {
  352. num = UnityEngine.Random.Range(0, table_param.Face.Count<string>());
  353. }
  354. face = table_param.Face[num];
  355. maid.FaceAnime(table_param.Face[num], 1f, 0);
  356. }
  357. else
  358. {
  359. RhythmAction_Mgr.Instance.SetMaidFaceStop(maid, false);
  360. }
  361. }
  362. else
  363. {
  364. RhythmAction_Mgr.Instance.SetMaidFaceStop(maid, false);
  365. }
  366. }
  367. else if (now_point != this.GetBordarPoint(touch_param, table))
  368. {
  369. int now_point2 = now_point;
  370. now_point = this.GetBordarPoint(touch_param, table);
  371. if (now_point == 0)
  372. {
  373. goto Block_10;
  374. }
  375. table_param = table.PointFacePair.SingleOrDefault((TouchAction_Mgr.StateTable.ParamSet e) => e.Point == now_point);
  376. timer = 0f;
  377. if (now_type == TouchActionParam.TouchType.セクハラ)
  378. {
  379. ParticleSystem.EmissionModule emission = this.m_MaidUIInfoSet[maid].SexualEffect.emission;
  380. ParticleSystem.MinMaxCurve rateOverTime = emission.rateOverTime;
  381. float num2 = this.m_MaidUIInfoSet[maid].SexualEffect.emission.rateOverTime.constantMax;
  382. if (now_point2 < now_point)
  383. {
  384. num2 *= 2f;
  385. }
  386. else
  387. {
  388. num2 /= 2f;
  389. }
  390. Debug.Log(num2);
  391. rateOverTime.constantMax = num2;
  392. emission.rateOverTime = rateOverTime;
  393. }
  394. }
  395. yield return null;
  396. }
  397. if (now_type == TouchActionParam.TouchType.セクハラ)
  398. {
  399. this.m_MaidUIInfoSet[maid].SexualEffect.gameObject.SetActive(false);
  400. }
  401. yield break;
  402. Block_10:
  403. if (now_type == TouchActionParam.TouchType.セクハラ)
  404. {
  405. this.m_MaidUIInfoSet[maid].SexualEffect.gameObject.SetActive(false);
  406. }
  407. yield break;
  408. yield break;
  409. }
  410. private int GetBordarPoint(TouchActionParam.ActionParam touch_param, TouchAction_Mgr.StateTable table)
  411. {
  412. int result = 0;
  413. foreach (TouchAction_Mgr.StateTable.ParamSet paramSet in table.PointFacePair)
  414. {
  415. if (touch_param.Point >= paramSet.Point)
  416. {
  417. result = paramSet.Point;
  418. }
  419. }
  420. return result;
  421. }
  422. public override void StartAction()
  423. {
  424. int num = 0;
  425. TouchAction_Mgr.VibeUIInfo previousUIInfo = null;
  426. foreach (Maid maid in RhythmAction_Mgr.Instance.DanceMaid)
  427. {
  428. if (!this.m_VibeTarget)
  429. {
  430. this.m_VibeTarget = maid;
  431. }
  432. TouchAction_Mgr.VibeUIInfo vibeUIInfo = new TouchAction_Mgr.VibeUIInfo();
  433. GameObject gameObject = Utility.CreatePrefab(base.gameObject, "SceneDance/Rhythm_Action/Prefab/" + this.m_IconName, true);
  434. gameObject.transform.localPosition = Vector3.right * (float)num * this.m_IconSetSpace + Vector3.up * this.m_IconSetSpace / 2f;
  435. vibeUIInfo.TargetMaid = maid;
  436. vibeUIInfo.UIObj = gameObject;
  437. vibeUIInfo.PreviousUIInfo = previousUIInfo;
  438. if (vibeUIInfo.PreviousUIInfo != null)
  439. {
  440. vibeUIInfo.PreviousUIInfo.NextUIInfo = vibeUIInfo;
  441. }
  442. vibeUIInfo.Icon = gameObject.transform.Find("IconMask/Icon").GetComponent<UI2DSprite>();
  443. vibeUIInfo.SexualEffect = gameObject.transform.Find("SexualEffect").GetComponent<ParticleSystem>();
  444. RhythmAction_Mgr.Instance.AddParticleSystem(vibeUIInfo.SexualEffect);
  445. vibeUIInfo.SexualEffect.gameObject.SetActive(false);
  446. Texture2D thumIcon = maid.GetThumIcon();
  447. if (thumIcon)
  448. {
  449. Sprite sprite2D = Sprite.Create(thumIcon, new Rect(0f, 0f, (float)thumIcon.width, (float)thumIcon.height), Vector2.one * 0.5f);
  450. vibeUIInfo.Icon.sprite2D = sprite2D;
  451. vibeUIInfo.Icon.width = (int)this.m_IconSetSpace;
  452. vibeUIInfo.Icon.height = (int)this.m_IconSetSpace;
  453. }
  454. this.m_ActionParam.Add(maid, new TouchActionParam());
  455. if (!Product.VBA)
  456. {
  457. GameObject gameObject2 = UnityEngine.Object.Instantiate<GameObject>(GameObject.Find("AudioSe(Clone)"));
  458. this.m_ActionParam[maid].VibeAudio = gameObject2.GetComponent<AudioSourceMgr>();
  459. this.m_ActionParam[maid].VibeAudio.name = "VibeSE";
  460. MaidColliderCollect.AddCollider(maid, MaidColliderCollect.ColliderType.Touch);
  461. maid.SetProp(MPN.accvag, "accVag_VibePink_I_.menu", 0, true, false);
  462. maid.AllProcPropSeqStart();
  463. num++;
  464. this.m_MaidUIInfoSet.Add(maid, vibeUIInfo);
  465. previousUIInfo = vibeUIInfo;
  466. }
  467. }
  468. this.m_SelectFrame.gameObject.SetActive(!Product.VBA);
  469. base.StartCoroutine(this.ActionCheck());
  470. }
  471. public override void EndAction()
  472. {
  473. base.StopAllCoroutines();
  474. if (!Product.VBA)
  475. {
  476. foreach (Maid maid in RhythmAction_Mgr.Instance.DanceMaid)
  477. {
  478. UnityEngine.Object.Destroy(this.m_ActionParam[maid].VibeAudio.gameObject);
  479. MaidColliderCollect.RemoveColliderAll(maid);
  480. maid.ResetProp(MPN.accvag, true);
  481. maid.AllProcProp();
  482. maid.FaceBlend("無し");
  483. }
  484. }
  485. }
  486. public bool IsMaidTouch()
  487. {
  488. return this.m_ActionParam.Values.Any((TouchActionParam maid) => maid.DoTouchAction());
  489. }
  490. public TouchActionParam GetTouchParam(Maid maid)
  491. {
  492. return this.m_ActionParam[maid];
  493. }
  494. private const float m_TouchPointTime = 2f;
  495. private const float m_NotTouchTime = 3f;
  496. private const float m_FaceChangeTime = 5f;
  497. private const float m_EffectEmitRate = 2f;
  498. private Dictionary<Maid, TouchActionParam> m_ActionParam = new Dictionary<Maid, TouchActionParam>();
  499. [SerializeField]
  500. [Header("タッチ箇所一覧")]
  501. private List<VRTouchMgr.ETouchPos> m_TouchPosList = new List<VRTouchMgr.ETouchPos>
  502. {
  503. VRTouchMgr.ETouchPos.頭頂部,
  504. VRTouchMgr.ETouchPos.髪の毛,
  505. VRTouchMgr.ETouchPos.胸,
  506. VRTouchMgr.ETouchPos.お腹,
  507. VRTouchMgr.ETouchPos.手,
  508. VRTouchMgr.ETouchPos.お尻,
  509. VRTouchMgr.ETouchPos.腿,
  510. VRTouchMgr.ETouchPos.リボン,
  511. VRTouchMgr.ETouchPos.スカ\u30FCト
  512. };
  513. private VRTouchMgr m_TouchMgr;
  514. [SerializeField]
  515. [Header("アンコールライブ時のカメラの初期位置")]
  516. private Vector3 m_FirstCamPos;
  517. private Dictionary<Maid, TouchAction_Mgr.VibeUIInfo> m_MaidUIInfoSet = new Dictionary<Maid, TouchAction_Mgr.VibeUIInfo>();
  518. private Maid m_VibeTarget;
  519. [SerializeField]
  520. [Header("アイコン選択UI")]
  521. private Transform m_SelectFrame;
  522. [SerializeField]
  523. [Header("アイコン設置間隔")]
  524. private float m_IconSetSpace = 100f;
  525. [SerializeField]
  526. [Header("アイコン名")]
  527. private string m_IconName = "VibeMaidIcon";
  528. [SerializeField]
  529. [Header("バイブOn時のアイコンの色")]
  530. private Color m_VibeOnColor = Color.red;
  531. [SerializeField]
  532. [Header("セクハラに該当するタッチ箇所")]
  533. private VRTouchMgr.ETouchPos[] m_SexualPos;
  534. [SerializeField]
  535. [Header("各種状態テーブル")]
  536. private TouchAction_Mgr.StateTable[] m_EachStateTable;
  537. private Dictionary<AVRController, AVRControllerButtons> m_ControllerInput = new Dictionary<AVRController, AVRControllerButtons>();
  538. private class VibeUIInfo
  539. {
  540. public Maid TargetMaid;
  541. public GameObject UIObj;
  542. public UI2DSprite Icon;
  543. public ParticleSystem SexualEffect;
  544. public TouchAction_Mgr.VibeUIInfo PreviousUIInfo;
  545. public TouchAction_Mgr.VibeUIInfo NextUIInfo;
  546. }
  547. [Serializable]
  548. private class StateTable
  549. {
  550. [Header("状態")]
  551. public TouchActionParam.TouchType Type;
  552. [Header("ポイントごとの表情変更設定")]
  553. public TouchAction_Mgr.StateTable.ParamSet[] PointFacePair;
  554. [Serializable]
  555. public class ParamSet
  556. {
  557. [Header("表情変更開始ポイント")]
  558. public int Point;
  559. [Header("表情ブレンド")]
  560. public string FaceBlend;
  561. [Header("表情変更確率")]
  562. public int Probability;
  563. [Header("表情リスト")]
  564. public string[] Face;
  565. }
  566. }
  567. }