MayuAlphaWindow.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using System;
  2. using UnityEngine;
  3. public class MayuAlphaWindow : BasePhotoWindow
  4. {
  5. public override string windowName
  6. {
  7. get
  8. {
  9. return "MayuWindow";
  10. }
  11. }
  12. public override void Start()
  13. {
  14. base.Start();
  15. this.SetWindowTitleFromLocalizeTerm("透明度");
  16. this.m_goParent = base.transform.Find("Parent").gameObject;
  17. this.maid = GameMain.Instance.CharacterMgr.GetMaid(0);
  18. this.value = this.slider.value;
  19. this.visible = false;
  20. }
  21. public void OnChangerValue(int value)
  22. {
  23. this.maid.MayuAlpha = value;
  24. }
  25. public override void Update()
  26. {
  27. if (SceneEdit.Instance.isFBFace && SceneEdit.Instance != null && SceneEdit.Instance.maid != null && SceneEdit.Instance.NowMPN == MPN.folder_mayu)
  28. {
  29. this.visible = true;
  30. if (this.slider.value != this.value)
  31. {
  32. this.OnChangerValue((int)this.slider.value);
  33. this.value = this.slider.value;
  34. }
  35. }
  36. else
  37. {
  38. this.visible = false;
  39. }
  40. }
  41. public PhotoSliderAndInput slider;
  42. private GameObject m_goParent;
  43. private float value;
  44. private Maid maid;
  45. }