CostumePartsEnabledMgr.cs 1.4 KB

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