McSkip.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using System;
  2. using UnityEngine;
  3. public class McSkip : MonoBehaviour
  4. {
  5. private void Init(string label)
  6. {
  7. this.m_SkipLabel = label;
  8. }
  9. private void Update()
  10. {
  11. if (Input.GetKeyDown(KeyCode.Return) && !GameMain.Instance.MainCamera.IsFadeProc() && !GameMain.Instance.MainCamera.IsFadeOut())
  12. {
  13. GameMain.Instance.ScriptMgr.adv_kag.ClearExecWait();
  14. GameMain.Instance.ScriptMgr.adv_kag.JumpLabel(this.m_SkipLabel);
  15. GameMain.Instance.ScriptMgr.adv_kag.Exec();
  16. }
  17. }
  18. public static void SkipWait(string label)
  19. {
  20. GameObject gameObject = new GameObject("McSkip", new Type[]
  21. {
  22. typeof(McSkip)
  23. });
  24. gameObject.GetComponent<McSkip>().Init(label);
  25. }
  26. public static void SkipRelease()
  27. {
  28. GameObject gameObject = GameObject.Find("McSkip");
  29. if (gameObject)
  30. {
  31. UnityEngine.Object.Destroy(gameObject);
  32. }
  33. if (MotionAction_Mgr.Instance)
  34. {
  35. MotionAction_Mgr.Instance.ForceEnd = true;
  36. }
  37. for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
  38. {
  39. Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
  40. if (maid)
  41. {
  42. maid.AudioMan.Stop();
  43. }
  44. }
  45. GameMain.Instance.SoundMgr.StopBGM(0f);
  46. GameMain.Instance.SoundMgr.StopSe();
  47. }
  48. [SerializeField]
  49. private string m_SkipLabel;
  50. }