TouchAction_Mgr.cs 19 KB

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