RandomPresetMgr.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System;
  2. using UnityEngine;
  3. public class RandomPresetMgr : BaseMgr<RandomPresetMgr>
  4. {
  5. private void Start()
  6. {
  7. UIRoot componentInParent = base.GetComponentInParent<UIRoot>();
  8. this.m_goRandomPresetPanel = componentInParent.transform.Find("RandomPresetPanel").gameObject;
  9. if (this.m_goRandomPresetPanel == null)
  10. {
  11. Debug.LogError(string.Format("{0}が見つかりませんでした", "RandomPresetPanel"));
  12. return;
  13. }
  14. this.m_randomPresetCtrl = this.m_goRandomPresetPanel.GetComponent<RandomPresetCtrl>();
  15. this.m_randomPresetCtrl.Init(this.m_goRandomPresetPanel);
  16. this.m_goRandomPresetPanel.SetActive(false);
  17. }
  18. public void OnButtonClick()
  19. {
  20. string name = UIButton.current.name;
  21. this.m_randomPresetCtrl.OnButtonClick(name);
  22. }
  23. public void Execute()
  24. {
  25. this.m_randomPresetCtrl.Execute();
  26. }
  27. public void OnAllButtonClick()
  28. {
  29. this.m_randomPresetCtrl.OnAllButtonClick();
  30. }
  31. public void OpenRandomPresetPanel()
  32. {
  33. this.m_randomPresetCtrl.LoadMaidPropData();
  34. this.m_goRandomPresetPanel.SetActive(true);
  35. }
  36. public void CloseRandomPresetPanel()
  37. {
  38. this.m_goRandomPresetPanel.SetActive(false);
  39. }
  40. private GameObject m_goRandomPresetPanel;
  41. private RandomPresetCtrl m_randomPresetCtrl;
  42. }